< prev index next >

src/hotspot/share/prims/whitebox.cpp

Print this page




 342     return !(hr->is_young());
 343   }
 344 #endif
 345 #if INCLUDE_PARALLELGC
 346   if (UseParallelGC) {
 347     ParallelScavengeHeap* psh = ParallelScavengeHeap::heap();
 348     return !psh->is_in_young(p);
 349   }
 350 #endif
 351 #if INCLUDE_ZGC
 352   if (UseZGC) {
 353     return Universe::heap()->is_in(p);
 354   }
 355 #endif
 356   GenCollectedHeap* gch = GenCollectedHeap::heap();
 357   return !gch->is_in_young(p);
 358 WB_END
 359 
 360 WB_ENTRY(jlong, WB_GetObjectSize(JNIEnv* env, jobject o, jobject obj))
 361   oop p = JNIHandles::resolve(obj);
 362   return p->size() * HeapWordSize;
 363 WB_END
 364 
 365 WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o))
 366   size_t alignment = Universe::heap()->collector_policy()->space_alignment();
 367   return (jlong)alignment;
 368 WB_END
 369 
 370 WB_ENTRY(jlong, WB_GetHeapAlignment(JNIEnv* env, jobject o))
 371   size_t alignment = Universe::heap()->collector_policy()->heap_alignment();
 372   return (jlong)alignment;
 373 WB_END
 374 
 375 WB_ENTRY(jboolean, WB_SupportsConcurrentGCPhaseControl(JNIEnv* env, jobject o))
 376   return Universe::heap()->supports_concurrent_phase_control();
 377 WB_END
 378 
 379 WB_ENTRY(jobjectArray, WB_GetConcurrentGCPhases(JNIEnv* env, jobject o))
 380   const char* const* phases = Universe::heap()->concurrent_phases();
 381   jint nphases = 0;
 382   for ( ; phases[nphases] != NULL; ++nphases) ;




 342     return !(hr->is_young());
 343   }
 344 #endif
 345 #if INCLUDE_PARALLELGC
 346   if (UseParallelGC) {
 347     ParallelScavengeHeap* psh = ParallelScavengeHeap::heap();
 348     return !psh->is_in_young(p);
 349   }
 350 #endif
 351 #if INCLUDE_ZGC
 352   if (UseZGC) {
 353     return Universe::heap()->is_in(p);
 354   }
 355 #endif
 356   GenCollectedHeap* gch = GenCollectedHeap::heap();
 357   return !gch->is_in_young(p);
 358 WB_END
 359 
 360 WB_ENTRY(jlong, WB_GetObjectSize(JNIEnv* env, jobject o, jobject obj))
 361   oop p = JNIHandles::resolve(obj);
 362   return (p->size() + Universe::heap()->oop_extra_words()) * HeapWordSize;
 363 WB_END
 364 
 365 WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o))
 366   size_t alignment = Universe::heap()->collector_policy()->space_alignment();
 367   return (jlong)alignment;
 368 WB_END
 369 
 370 WB_ENTRY(jlong, WB_GetHeapAlignment(JNIEnv* env, jobject o))
 371   size_t alignment = Universe::heap()->collector_policy()->heap_alignment();
 372   return (jlong)alignment;
 373 WB_END
 374 
 375 WB_ENTRY(jboolean, WB_SupportsConcurrentGCPhaseControl(JNIEnv* env, jobject o))
 376   return Universe::heap()->supports_concurrent_phase_control();
 377 WB_END
 378 
 379 WB_ENTRY(jobjectArray, WB_GetConcurrentGCPhases(JNIEnv* env, jobject o))
 380   const char* const* phases = Universe::heap()->concurrent_phases();
 381   jint nphases = 0;
 382   for ( ; phases[nphases] != NULL; ++nphases) ;


< prev index next >