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

Reviewed-by: iklam
  • Loading branch information
tstuefe committed Feb 2, 2021
1 parent fe407cf commit ddd2951ba91fe3860b92d2f9bad4e0d900f1d650
Showing with 11 additions and 0 deletions.
  1. +3 −0 src/hotspot/share/runtime/globals.hpp
  2. +8 −0 src/hotspot/share/runtime/java.cpp
@@ -1490,6 +1490,9 @@ const intx ObjectAlignmentInBytes = 8;
product(ccstr, MetaspaceReclaimPolicy, "balanced", \
"options: balanced, aggressive, none") \
\
product(bool, PrintMetaspaceStatisticsAtExit, false, DIAGNOSTIC, \
"Print metaspace statistics upon VM exit.") \
\
product(bool, MetaspaceGuardAllocations, false, DIAGNOSTIC, \
"Metapace allocations are guarded.") \
\
@@ -328,6 +328,10 @@ void print_statistics() {
MemTracker::final_report(tty);
}

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

ThreadsSMRSupport::log_statistics();
}

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

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

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

0 comments on commit ddd2951

Please sign in to comment.