6710654: SAJDI failures with Compressed Oops

Wed, 04 Jun 2008 14:03:48 -0700

author
kvn
date
Wed, 04 Jun 2008 14:03:48 -0700
changeset 615
b9ebd46331d2
parent 609
510f98a80563
child 616
823298b11afc

6710654: SAJDI failures with Compressed Oops
Summary: Use correct offset for the java.lang.Class _klass field in SA.
Reviewed-by: jrose, never

agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java file | annotate | diff | comparison | revisions
     1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Tue Jun 03 13:14:44 2008 -0700
     1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Wed Jun 04 14:03:48 2008 -0700
     1.3 @@ -274,10 +274,10 @@
     1.4         // hc_klass is a HotSpot magic field and hence we can't
     1.5         // find it from InstanceKlass for java.lang.Class.
     1.6         TypeDataBase db = VM.getVM().getTypeDataBase();
     1.7 -       int hcKlassOffset = (int) Oop.getHeaderSize();
     1.8 +       int hcKlassOffset = (int) Instance.getHeaderSize();
     1.9         try {
    1.10            hcKlassOffset += (db.lookupIntConstant("java_lang_Class::hc_klass_offset").intValue() *
    1.11 -                           db.getAddressSize());
    1.12 +                           VM.getVM().getHeapOopSize());
    1.13         } catch (RuntimeException re) {
    1.14            // ignore, currently java_lang_Class::hc_klass_offset is zero
    1.15         }

mercurial