393 return !(hr->is_young());
394 }
395 #endif
396 #if INCLUDE_PARALLELGC
397 if (UseParallelGC) {
398 ParallelScavengeHeap* psh = ParallelScavengeHeap::heap();
399 return !psh->is_in_young(p);
400 }
401 #endif
402 #if INCLUDE_ZGC
403 if (UseZGC) {
404 if (ZGenerational) {
405 return ZHeap::heap()->is_old(to_zaddress(p));
406 } else {
407 return Universe::heap()->is_in(p);
408 }
409 }
410 #endif
411 #if INCLUDE_SHENANDOAHGC
412 if (UseShenandoahGC) {
413 return Universe::heap()->is_in(p);
414 }
415 #endif
416 GenCollectedHeap* gch = GenCollectedHeap::heap();
417 return !gch->is_in_young(p);
418 WB_END
419
420 WB_ENTRY(jlong, WB_GetObjectSize(JNIEnv* env, jobject o, jobject obj))
421 oop p = JNIHandles::resolve(obj);
422 return p->size() * HeapWordSize;
423 WB_END
424
425 WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o))
426 return (jlong)SpaceAlignment;
427 WB_END
428
429 WB_ENTRY(jlong, WB_GetHeapAlignment(JNIEnv* env, jobject o))
430 return (jlong)HeapAlignment;
431 WB_END
432
433 WB_ENTRY(jboolean, WB_SupportsConcurrentGCBreakpoints(JNIEnv* env, jobject o))
|
393 return !(hr->is_young());
394 }
395 #endif
396 #if INCLUDE_PARALLELGC
397 if (UseParallelGC) {
398 ParallelScavengeHeap* psh = ParallelScavengeHeap::heap();
399 return !psh->is_in_young(p);
400 }
401 #endif
402 #if INCLUDE_ZGC
403 if (UseZGC) {
404 if (ZGenerational) {
405 return ZHeap::heap()->is_old(to_zaddress(p));
406 } else {
407 return Universe::heap()->is_in(p);
408 }
409 }
410 #endif
411 #if INCLUDE_SHENANDOAHGC
412 if (UseShenandoahGC) {
413 ShenandoahHeap* sh = ShenandoahHeap::heap();
414 return sh->mode()->is_generational() ? sh->is_in_old(p) : sh->is_in(p);
415 }
416 #endif
417 GenCollectedHeap* gch = GenCollectedHeap::heap();
418 return !gch->is_in_young(p);
419 WB_END
420
421 WB_ENTRY(jlong, WB_GetObjectSize(JNIEnv* env, jobject o, jobject obj))
422 oop p = JNIHandles::resolve(obj);
423 return p->size() * HeapWordSize;
424 WB_END
425
426 WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o))
427 return (jlong)SpaceAlignment;
428 WB_END
429
430 WB_ENTRY(jlong, WB_GetHeapAlignment(JNIEnv* env, jobject o))
431 return (jlong)HeapAlignment;
432 WB_END
433
434 WB_ENTRY(jboolean, WB_SupportsConcurrentGCBreakpoints(JNIEnv* env, jobject o))
|