hotspot/src/share/vm/prims/whitebox.cpp
changeset 19986 33d188c66ed9
parent 19554 3f21e829c7de
child 21554 20b1821f4fbd
child 21561 c619b1cb4554
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Wed Sep 11 12:03:41 2013 +0200
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Wed Sep 11 16:25:02 2013 +0200
@@ -33,6 +33,7 @@
 #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"
@@ -94,6 +95,11 @@
   return closure.found();
 WB_END
 
+WB_ENTRY(jlong, WB_GetCompressedOopsMaxHeapSize(JNIEnv* env, jobject o)) {
+  return (jlong)Arguments::max_heap_for_compressed_oops();
+}
+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 "
@@ -436,6 +442,8 @@
       CC"(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;",
       (void*) &WB_ParseCommandLine
   },
+  {CC"getCompressedOopsMaxHeapSize", CC"()J",
+      (void*)&WB_GetCompressedOopsMaxHeapSize},
   {CC"printHeapSizes",     CC"()V",                   (void*)&WB_PrintHeapSizes    },
 #if INCLUDE_ALL_GCS
   {CC"g1InConcurrentMark", CC"()Z",                   (void*)&WB_G1InConcurrentMark},