Skip to content

Commit

Permalink
8310134: NMT: thread count in Thread section of VM.native_memory outp…
Browse files Browse the repository at this point in the history
…ut confusing with virtual threads

Reviewed-by: jsjolen, dholmes, alanb
  • Loading branch information
Gerard Ziemski committed Aug 15, 2023
1 parent 2e8a0ab commit f239954
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/services/memReporter.cpp
Expand Up @@ -226,15 +226,15 @@ void MemSummaryReporter::report_summary_of_type(MEMFLAGS flag,
const VirtualMemory* thread_stack_usage =
_vm_snapshot->by_type(mtThreadStack);
// report thread count
out->print_cr("%27s (thread #" SIZE_FORMAT ")", " ", ThreadStackTracker::thread_count());
out->print_cr("%27s (threads #" SIZE_FORMAT ")", " ", ThreadStackTracker::thread_count());
out->print("%27s (stack: ", " ");
print_total(thread_stack_usage->reserved(), thread_stack_usage->committed());
} else {
MallocMemory* thread_stack_memory = _malloc_snapshot->by_type(mtThreadStack);
const char* scale = current_scale();
// report thread count
assert(ThreadStackTracker::thread_count() == 0, "Not used");
out->print_cr("%27s (thread #" SIZE_FORMAT ")", " ", thread_stack_memory->malloc_count());
out->print_cr("%27s (threads #" SIZE_FORMAT ")", " ", thread_stack_memory->malloc_count());
out->print("%27s (Stack: " SIZE_FORMAT "%s", " ",
amount_in_current_scale(thread_stack_memory->malloc_size()), scale);
}
Expand Down Expand Up @@ -595,7 +595,7 @@ void MemSummaryDiffReporter::diff_summary_of_type(MEMFLAGS flag,

} else if (flag == mtThread) {
// report thread count
out->print("%27s (thread #" SIZE_FORMAT "", " ", _current_baseline.thread_count());
out->print("%27s (threads #" SIZE_FORMAT "", " ", _current_baseline.thread_count());
const ssize_t thread_count_diff = counter_diff(_current_baseline.thread_count(), _early_baseline.thread_count());
if (thread_count_diff != 0) {
out->print(" " SSIZE_PLUS_FORMAT, thread_count_diff);
Expand Down

1 comment on commit f239954

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.