Skip to content
Permalink
Browse files
8260571: Add PrintMetaspaceStatistics to print metaspace statistics u…
…pon VM exit

Reviewed-by: clanger
Backport-of: ddd2951
  • Loading branch information
tstuefe committed Sep 16, 2021
1 parent e9aaba4 commit 263d070e28ae4da0b28afa5fe5b7761488cfb548
Showing 2 changed files with 11 additions and 0 deletions.
@@ -1824,6 +1824,9 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
"class pointers are used") \
range(1*M, 3*G) \
\
diagnostic(bool, PrintMetaspaceStatisticsAtExit, false, \
"Print metaspace statistics upon VM exit.") \
\
manageable(uintx, MinHeapFreeRatio, 40, \
"The minimum percentage of heap free after GC to avoid expansion."\
" For most GCs this applies to the old generation. In G1 and" \
@@ -380,6 +380,10 @@ void print_statistics() {
MemTracker::final_report(tty);
}

if (PrintMetaspaceStatisticsAtExit) {
MetaspaceUtils::print_basic_report(tty, 0);
}

ThreadsSMRSupport::log_statistics();
}

@@ -423,6 +427,10 @@ void print_statistics() {
MemTracker::final_report(tty);
}

if (PrintMetaspaceStatisticsAtExit) {
MetaspaceUtils::print_basic_report(tty, 0);
}

if (LogTouchedMethods && PrintTouchedMethodsAtExit) {
Method::print_touched_methods(tty);
}

1 comment on commit 263d070

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 263d070 Sep 16, 2021

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.