Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/oops/java_lang_Class.java @ 3945:8ed53447f690
Merge
author | iveresov |
---|---|
date | Thu, 15 Sep 2011 12:44:09 -0700 |
parents | e6b1331a51d2 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
3929:f94227b6117b | 3945:8ed53447f690 |
---|---|
53 | 53 |
54 private static synchronized void initialize(TypeDataBase db) { | 54 private static synchronized void initialize(TypeDataBase db) { |
55 // klass and oop_size are HotSpot magic fields and hence we can't | 55 // klass and oop_size are HotSpot magic fields and hence we can't |
56 // find them from InstanceKlass for java.lang.Class. | 56 // find them from InstanceKlass for java.lang.Class. |
57 Type jlc = db.lookupType("java_lang_Class"); | 57 Type jlc = db.lookupType("java_lang_Class"); |
58 int klassOffset = (int) jlc.getCIntegerField("klass_offset").getValue(); | 58 int klassOffset = (int) jlc.getCIntegerField("_klass_offset").getValue(); |
59 if (VM.getVM().isCompressedOopsEnabled()) { | 59 if (VM.getVM().isCompressedOopsEnabled()) { |
60 klassField = new NarrowOopField(new NamedFieldIdentifier("klass"), klassOffset, true); | 60 klassField = new NarrowOopField(new NamedFieldIdentifier("klass"), klassOffset, true); |
61 } else { | 61 } else { |
62 klassField = new OopField(new NamedFieldIdentifier("klass"), klassOffset, true); | 62 klassField = new OopField(new NamedFieldIdentifier("klass"), klassOffset, true); |
63 } | 63 } |
64 int oopSizeOffset = (int) jlc.getCIntegerField("oop_size_offset").getValue(); | 64 int oopSizeOffset = (int) jlc.getCIntegerField("_oop_size_offset").getValue(); |
65 oopSizeField = new IntField(new NamedFieldIdentifier("oop_size"), oopSizeOffset, true); | 65 oopSizeField = new IntField(new NamedFieldIdentifier("oop_size"), oopSizeOffset, true); |
66 } | 66 } |
67 | 67 |
68 /** get klassOop field at offset hc_klass_offset from a java.lang.Class object */ | 68 /** get klassOop field at offset hc_klass_offset from a java.lang.Class object */ |
69 public static Klass asKlass(Oop aClass) { | 69 public static Klass asKlass(Oop aClass) { |