Mercurial > hg > truffle
changeset 180:b9ebd46331d2
6710654: SAJDI failures with Compressed Oops
Summary: Use correct offset for the java.lang.Class _klass field in SA.
Reviewed-by: jrose, never
author | kvn |
---|---|
date | Wed, 04 Jun 2008 14:03:48 -0700 |
parents | 510f98a80563 |
children | 823298b11afc |
files | agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java Tue Jun 03 13:14:44 2008 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java Wed Jun 04 14:03:48 2008 -0700 @@ -274,10 +274,10 @@ // hc_klass is a HotSpot magic field and hence we can't // find it from InstanceKlass for java.lang.Class. TypeDataBase db = VM.getVM().getTypeDataBase(); - int hcKlassOffset = (int) Oop.getHeaderSize(); + int hcKlassOffset = (int) Instance.getHeaderSize(); try { hcKlassOffset += (db.lookupIntConstant("java_lang_Class::hc_klass_offset").intValue() * - db.getAddressSize()); + VM.getVM().getHeapOopSize()); } catch (RuntimeException re) { // ignore, currently java_lang_Class::hc_klass_offset is zero }