< prev index next >

src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java

Print this page
rev 63811 : Make Instrumentation.getObjectSize call the intrinsified Runtime.sizeOf instead of going native

@@ -208,11 +208,12 @@
     public long
     getObjectSize(Object objectToSize) {
         if (objectToSize == null) {
             throw new NullPointerException("null passed as 'objectToSize' in getObjectSize");
         }
-        return getObjectSize0(mNativeAgent, objectToSize);
+        // Call the intrinsified method instead.
+        return Runtime.sizeOf(objectToSize);
     }
 
     public void
     appendToBootstrapClassLoaderSearch(JarFile jarfile) {
         appendToClassLoaderSearch0(mNativeAgent, jarfile.getName(), true);
< prev index next >