--- old/src/hotspot/share/runtime/java.cpp 2018-03-01 18:09:53.605618000 +0100 +++ new/src/hotspot/share/runtime/java.cpp 2018-03-01 18:09:53.320550000 +0100 @@ -235,6 +235,11 @@ CompileBroker::print_times(); } + // 8198691: CodeHeap State Analytics. + if (PrintCodeHeapState) { + CompileBroker::print_heapinfo(NULL, "all", "4096"); // details + } + #ifdef COMPILER1 if ((PrintC1Statistics || LogVMOutput || LogCompilation) && UseCompiler) { FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintC1Statistics); @@ -316,8 +321,8 @@ CodeCache::print(); } - if (PrintMethodFlushingStatistics) { - NMethodSweeper::print(); + if (PrintMethodFlushingStatistics && !PrintCodeHeapState) { + NMethodSweeper::print(tty); } if (PrintCodeCache2) { @@ -377,8 +382,13 @@ CodeCache::print(); } - if (PrintMethodFlushingStatistics) { - NMethodSweeper::print(); + if (PrintMethodFlushingStatistics && !PrintCodeHeapState) { + NMethodSweeper::print(tty); + } + + // 8198691: CodeHeap State Analytics. + if (PrintCodeHeapState) { + CompileBroker::print_heapinfo(NULL, "all", "4096"); // details } #ifdef COMPILER2