Mercurial > hg > truffle
diff test/testlibrary/whitebox/sun/hotspot/WhiteBox.java @ 20357:4bfc44ba0d19
8055098: WB API should be extended to provide information about size and age of object.
Summary: Extend the WhiteBox API to provide information about the size and age of objects. Further add a mechanism to trigger a young GC.
Reviewed-by: tschatzl, sjohanss
Contributed-by: Leonid Mesnik <leonid.mesnik@oracle.com>
author | tschatzl |
---|---|
date | Thu, 21 Aug 2014 16:44:41 +0200 |
parents | 2c6ef90f030a |
children | 833b0f92429a |
line wrap: on
line diff
--- a/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Mon Aug 25 17:05:18 2014 -0400 +++ b/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Thu Aug 21 16:44:41 2014 +0200 @@ -69,6 +69,8 @@ // Memory public native long getObjectAddress(Object o); public native int getHeapOopSize(); + public native boolean isObjectInOldGen(Object o); + public native long getObjectSize(Object o); // Runtime // Make sure class name is in the correct format @@ -145,6 +147,9 @@ public native long allocateMetaspace(ClassLoader classLoader, long size); public native void freeMetaspace(ClassLoader classLoader, long addr, long size); + // force Young GC + public native void youngGC(); + // force Full GC public native void fullGC();