src/share/vm/prims/whitebox.cpp

Print this page




  87 
  88 WB_ENTRY(jboolean, WB_IsClassAlive(JNIEnv* env, jobject target, jstring name))
  89   Handle h_name = JNIHandles::resolve(name);
  90   if (h_name.is_null()) return false;
  91   Symbol* sym = java_lang_String::as_symbol(h_name, CHECK_false);
  92   TempNewSymbol tsym(sym); // Make sure to decrement reference count on sym on return
  93 
  94   WBIsKlassAliveClosure closure(sym);
  95   ClassLoaderDataGraph::classes_do(&closure);
  96 
  97   return closure.found();
  98 WB_END
  99 
 100 WB_ENTRY(jlong, WB_GetCompressedOopsMaxHeapSize(JNIEnv* env, jobject o)) {
 101   return (jlong)Arguments::max_heap_for_compressed_oops();
 102 }
 103 WB_END
 104 
 105 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) {
 106   CollectorPolicy * p = Universe::heap()->collector_policy();
 107   gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap "
 108     SIZE_FORMAT" Maximum heap "SIZE_FORMAT" Min alignment "SIZE_FORMAT" Max alignment "SIZE_FORMAT,
 109     p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(),
 110     p->space_alignment(), p->heap_alignment());
 111 }
 112 WB_END
 113 
 114 #ifndef PRODUCT
 115 // Forward declaration
 116 void TestReservedSpace_test();
 117 void TestReserveMemorySpecial_test();
 118 void TestVirtualSpace_test();
 119 void TestMetaspaceAux_test();
 120 #endif
 121 
 122 WB_ENTRY(void, WB_RunMemoryUnitTests(JNIEnv* env, jobject o))
 123 #ifndef PRODUCT
 124   TestReservedSpace_test();
 125   TestReserveMemorySpecial_test();
 126   TestVirtualSpace_test();
 127   TestMetaspaceAux_test();
 128 #endif




  87 
  88 WB_ENTRY(jboolean, WB_IsClassAlive(JNIEnv* env, jobject target, jstring name))
  89   Handle h_name = JNIHandles::resolve(name);
  90   if (h_name.is_null()) return false;
  91   Symbol* sym = java_lang_String::as_symbol(h_name, CHECK_false);
  92   TempNewSymbol tsym(sym); // Make sure to decrement reference count on sym on return
  93 
  94   WBIsKlassAliveClosure closure(sym);
  95   ClassLoaderDataGraph::classes_do(&closure);
  96 
  97   return closure.found();
  98 WB_END
  99 
 100 WB_ENTRY(jlong, WB_GetCompressedOopsMaxHeapSize(JNIEnv* env, jobject o)) {
 101   return (jlong)Arguments::max_heap_for_compressed_oops();
 102 }
 103 WB_END
 104 
 105 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) {
 106   CollectorPolicy * p = Universe::heap()->collector_policy();
 107   gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap "SIZE_FORMAT" Maximum heap "SIZE_FORMAT
 108     " Space alignment "SIZE_FORMAT" Heap alignment "SIZE_FORMAT,
 109     p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(),
 110     p->space_alignment(), p->heap_alignment());
 111 }
 112 WB_END
 113 
 114 #ifndef PRODUCT
 115 // Forward declaration
 116 void TestReservedSpace_test();
 117 void TestReserveMemorySpecial_test();
 118 void TestVirtualSpace_test();
 119 void TestMetaspaceAux_test();
 120 #endif
 121 
 122 WB_ENTRY(void, WB_RunMemoryUnitTests(JNIEnv* env, jobject o))
 123 #ifndef PRODUCT
 124   TestReservedSpace_test();
 125   TestReserveMemorySpecial_test();
 126   TestVirtualSpace_test();
 127   TestMetaspaceAux_test();
 128 #endif