src/share/vm/prims/whitebox.cpp

Print this page

        

@@ -31,10 +31,11 @@
 #include "classfile/classLoaderData.hpp"
 
 #include "prims/whitebox.hpp"
 #include "prims/wbtestmethods/parserTests.hpp"
 
+#include "runtime/arguments.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/os.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/exceptions.hpp"

@@ -92,10 +93,16 @@
   ClassLoaderDataGraph::classes_do(&closure);
 
   return closure.found();
 WB_END
 
+WB_ENTRY(void, WB_PrintCompressedOopsHeapInfo(JNIEnv* env, jobject o)) {
+  gclog_or_tty->print_cr("Max heap for compressed oops "SIZE_FORMAT" ClassMetaspaceSize "SIZE_FORMAT,
+    Arguments::max_heap_for_compressed_oops(), ClassMetaspaceSize);
+}
+WB_END
+
 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) {
   CollectorPolicy * p = Universe::heap()->collector_policy();
   gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap "
     SIZE_FORMAT" Maximum heap "SIZE_FORMAT" Min alignment "SIZE_FORMAT" Max alignment "SIZE_FORMAT,
     p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(),

@@ -404,10 +411,13 @@
   {CC"isClassAlive0",      CC"(Ljava/lang/String;)Z", (void*)&WB_IsClassAlive      },
   {CC"parseCommandLine",
       CC"(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;",
       (void*) &WB_ParseCommandLine
   },
+  {CC"printCompressedOopsHeapInfo",
+      CC"()V",
+      (void*)&WB_PrintCompressedOopsHeapInfo},
   {CC"printHeapSizes",     CC"()V",                   (void*)&WB_PrintHeapSizes    },
 #if INCLUDE_ALL_GCS
   {CC"g1InConcurrentMark", CC"()Z",                   (void*)&WB_G1InConcurrentMark},
   {CC"g1IsHumongous",      CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous     },
   {CC"g1NumFreeRegions",   CC"()J",                   (void*)&WB_G1NumFreeRegions  },