Mercurial > hg > graal-compiler
comparison agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java @ 6848:8e47bac5643a
7054512: Compress class pointers after perm gen removal
Summary: support of compress class pointers in the compilers.
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Tue, 09 Oct 2012 10:11:38 +0200 |
parents | da91efe96a93 |
children |
comparison
equal
deleted
inserted
replaced
6847:65d07d9ee446 | 6848:8e47bac5643a |
---|---|
51 } | 51 } |
52 | 52 |
53 private static void initialize(TypeDataBase db) { | 53 private static void initialize(TypeDataBase db) { |
54 Type type = db.lookupType("oopDesc"); | 54 Type type = db.lookupType("oopDesc"); |
55 | 55 |
56 if (VM.getVM().isCompressedHeadersEnabled()) { | 56 if (VM.getVM().isCompressedKlassPointersEnabled()) { |
57 // klassField = type.getNarrowOopField("_metadata._compressed_klass"); | 57 klassField = type.getAddressField("_metadata._compressed_klass"); |
58 throw new InternalError("unimplemented"); | |
59 } else { | 58 } else { |
60 klassField = type.getAddressField("_metadata._klass"); | 59 klassField = type.getAddressField("_metadata._klass"); |
61 } | 60 } |
62 } | 61 } |
63 | 62 |
68 if (!VM.getVM().getUniverse().isIn(oop)) { | 67 if (!VM.getVM().getUniverse().isIn(oop)) { |
69 return false; | 68 return false; |
70 } | 69 } |
71 try { | 70 try { |
72 // Try to instantiate the Klass | 71 // Try to instantiate the Klass |
73 Metadata.instantiateWrapperFor(klassField.getValue(oop)); | 72 if (VM.getVM().isCompressedKlassPointersEnabled()) { |
73 Metadata.instantiateWrapperFor(oop.getCompKlassAddressAt(klassField.getOffset())); | |
74 } else { | |
75 Metadata.instantiateWrapperFor(klassField.getValue(oop)); | |
76 } | |
74 return true; | 77 return true; |
75 } | 78 } |
76 catch (AddressException e) { | 79 catch (AddressException e) { |
77 return false; | 80 return false; |
78 } | 81 } |