# HG changeset patch # User lucy # Date 1543837142 -3600 # Node ID 17cd32809bed6f0eed9b0d994fdf27ecdce12b90 # Parent 9501a7b59111d3a158b9136dbc8638ea1cb67f8a 8214526: Change CodeHeap State Analytics control from UL to Print* Reviewed-by: diff --git a/src/hotspot/share/code/codeCache.cpp b/src/hotspot/share/code/codeCache.cpp --- a/src/hotspot/share/code/codeCache.cpp +++ b/src/hotspot/share/code/codeCache.cpp @@ -1411,8 +1411,7 @@ } if (heap->full_count() == 0) { - LogTarget(Debug, codecache) lt; - if (lt.is_enabled()) { + if (PrintCodeHeapAnalysis) { CompileBroker::print_heapinfo(tty, "all", "4096"); // details, may be a lot! } } diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -723,6 +723,9 @@ "Print the code cache memory usage each time a method is " \ "compiled") \ \ + diagnostic(bool, PrintCodeHeapAnalysis, false, \ + "Print code heap usage statistics on exit and on full condition") \ + \ diagnostic(bool, PrintStubCode, false, \ "Print generated stub code") \ \ diff --git a/src/hotspot/share/runtime/java.cpp b/src/hotspot/share/runtime/java.cpp --- a/src/hotspot/share/runtime/java.cpp +++ b/src/hotspot/share/runtime/java.cpp @@ -318,8 +318,7 @@ // CodeHeap State Analytics. // Does also call NMethodSweeper::print(tty) - LogTarget(Trace, codecache) lt; - if (lt.is_enabled()) { + if (PrintCodeHeapAnalysis) { CompileBroker::print_heapinfo(NULL, "all", "4096"); // details } else if (PrintMethodFlushingStatistics) { NMethodSweeper::print(tty); @@ -387,8 +386,7 @@ // CodeHeap State Analytics. // Does also call NMethodSweeper::print(tty) - LogTarget(Trace, codecache) lt; - if (lt.is_enabled()) { + if (PrintCodeHeapAnalysis) { CompileBroker::print_heapinfo(NULL, "all", "4096"); // details } else if (PrintMethodFlushingStatistics) { NMethodSweeper::print(tty);