< prev index next >

src/hotspot/share/prims/whitebox.cpp

Print this page

 416     return hr->is_old_or_humongous();
 417   }
 418 #endif
 419 #if INCLUDE_PARALLELGC
 420   if (UseParallelGC) {
 421     ParallelScavengeHeap* psh = ParallelScavengeHeap::heap();
 422     return !psh->is_in_young(p);
 423   }
 424 #endif
 425 #if INCLUDE_ZGC
 426   if (UseZGC) {
 427     if (ZGenerational) {
 428       return ZHeap::heap()->is_old(to_zaddress(p));
 429     } else {
 430       return Universe::heap()->is_in(p);
 431     }
 432   }
 433 #endif
 434 #if INCLUDE_SHENANDOAHGC
 435   if (UseShenandoahGC) {
 436     return Universe::heap()->is_in(p);

 437   }
 438 #endif
 439 #if INCLUDE_SERIALGC
 440   if (UseSerialGC) {
 441     return !SerialHeap::heap()->is_in_young(p);
 442   }
 443 #endif
 444   ShouldNotReachHere();
 445   return false;
 446 WB_END
 447 
 448 WB_ENTRY(jlong, WB_GetObjectSize(JNIEnv* env, jobject o, jobject obj))
 449   oop p = JNIHandles::resolve(obj);
 450   return p->size() * HeapWordSize;
 451 WB_END
 452 
 453 WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o))
 454   return (jlong)SpaceAlignment;
 455 WB_END
 456 

 416     return hr->is_old_or_humongous();
 417   }
 418 #endif
 419 #if INCLUDE_PARALLELGC
 420   if (UseParallelGC) {
 421     ParallelScavengeHeap* psh = ParallelScavengeHeap::heap();
 422     return !psh->is_in_young(p);
 423   }
 424 #endif
 425 #if INCLUDE_ZGC
 426   if (UseZGC) {
 427     if (ZGenerational) {
 428       return ZHeap::heap()->is_old(to_zaddress(p));
 429     } else {
 430       return Universe::heap()->is_in(p);
 431     }
 432   }
 433 #endif
 434 #if INCLUDE_SHENANDOAHGC
 435   if (UseShenandoahGC) {
 436     ShenandoahHeap* sh = ShenandoahHeap::heap();
 437     return sh->mode()->is_generational() ?  sh->is_in_old(p) : sh->is_in(p);
 438   }
 439 #endif
 440 #if INCLUDE_SERIALGC
 441   if (UseSerialGC) {
 442     return !SerialHeap::heap()->is_in_young(p);
 443   }
 444 #endif
 445   ShouldNotReachHere();
 446   return false;
 447 WB_END
 448 
 449 WB_ENTRY(jlong, WB_GetObjectSize(JNIEnv* env, jobject o, jobject obj))
 450   oop p = JNIHandles::resolve(obj);
 451   return p->size() * HeapWordSize;
 452 WB_END
 453 
 454 WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o))
 455   return (jlong)SpaceAlignment;
 456 WB_END
 457 
< prev index next >