mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
6710654: SAJDI failures with Compressed Oops
Use correct offset for the java.lang.Class _klass field in SA. Reviewed-by: jrose, never
This commit is contained in:
parent
d10912d513
commit
00bce59c67
1 changed files with 2 additions and 2 deletions
|
@ -274,10 +274,10 @@ public class OopUtilities implements /* imports */ JVMTIThreadState {
|
|||
// 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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue