src/hotspot/share/prims/jvmtiEnv.cpp
changeset 52071 c4a39588a075
parent 51467 12997ebbc0d8
child 52131 e9727e6b5fc1
--- a/src/hotspot/share/prims/jvmtiEnv.cpp	Wed Oct 03 15:22:16 2018 +0200
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp	Wed Oct 10 10:58:48 2018 +0200
@@ -470,7 +470,7 @@
 JvmtiEnv::GetObjectSize(jobject object, jlong* size_ptr) {
   oop mirror = JNIHandles::resolve_external_guard(object);
   NULL_CHECK(mirror, JVMTI_ERROR_INVALID_OBJECT);
-  *size_ptr = (jlong)mirror->size() * wordSize;
+  *size_ptr = (jlong)Universe::heap()->obj_size(mirror) * wordSize;
   return JVMTI_ERROR_NONE;
 } /* end GetObjectSize */