[11u] RFR 8225388: Running jcmd Compiler.CodeHeap_Analytics all 0 cause crash.

Roland Westrelin rwestrel at redhat.com
Tue Aug 20 08:17:43 UTC 2019


Original bug:

https://bugs.openjdk.java.net/browse/JDK-8225388
http://hg.openjdk.java.net/jdk/jdk/rev/3493c1bc59fd

Original patch does not apply cleanly. Failed hunks are:

--- codeCache.cpp
+++ codeCache.cpp
@@ -1284,7 +1284,7 @@
 
     if (heap->full_count() == 0) {
       if (PrintCodeHeapAnalytics) {
-        CompileBroker::print_heapinfo(tty, "all", "4096"); // details, may be a lot!
+        CompileBroker::print_heapinfo(tty, "all", 4096); // details, may be a lot!
       }
     }
   }

--- java.cpp
+++ java.cpp
@@ -310,7 +310,7 @@
   // CodeHeap State Analytics.
   // Does also call NMethodSweeper::print(tty)
   if (PrintCodeHeapAnalytics) {
-    CompileBroker::print_heapinfo(NULL, "all", "4096"); // details
+    CompileBroker::print_heapinfo(NULL, "all", 4096); // details
   } else if (PrintMethodFlushingStatistics) {
     NMethodSweeper::print(tty);
   }
@@ -378,7 +378,7 @@
   // CodeHeap State Analytics.
   // Does also call NMethodSweeper::print(tty)
   if (PrintCodeHeapAnalytics) {
-    CompileBroker::print_heapinfo(NULL, "all", "4096"); // details
+    CompileBroker::print_heapinfo(NULL, "all", 4096); // details
   } else if (PrintMethodFlushingStatistics) {
     NMethodSweeper::print(tty);
   }

and are straightforward to fix. They are caused by missing 8214526:
Change CodeHeap State Analytics control from UL to Print*. 

Testing: x86_64 build and tier1 testing. New webrev:

http://cr.openjdk.java.net/~roland/8225388-11u/webrev.00/

Roland.


More information about the jdk-updates-dev mailing list