Mercurial > hg > graal-jvmci-8
diff agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.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 | c18cbe5936b8 |
children |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java Mon Oct 08 17:04:00 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java Tue Oct 09 10:11:38 2012 +0200 @@ -58,6 +58,10 @@ protected long heapOopSize; protected long narrowOopBase; // heap base for compressed oops. protected int narrowOopShift; // shift to decode compressed oops. + // class metadata space + protected long klassPtrSize; + protected long narrowKlassBase; // heap base for compressed klass ptrs. + protected int narrowKlassShift; // shift to decode compressed klass ptrs. // Should be initialized if desired by calling initCache() private PageCache cache; @@ -159,10 +163,14 @@ javaPrimitiveTypesConfigured = true; } - public void putHeapConst(long heapOopSize, long narrowOopBase, int narrowOopShift) { + public void putHeapConst(long heapOopSize, long klassPtrSize, long narrowOopBase, int narrowOopShift, + long narrowKlassBase, int narrowKlassShift) { this.heapOopSize = heapOopSize; + this.klassPtrSize = klassPtrSize; this.narrowOopBase = narrowOopBase; this.narrowOopShift = narrowOopShift; + this.narrowKlassBase = narrowKlassBase; + this.narrowKlassShift = narrowKlassShift; } /** May be called by subclasses if desired to initialize the page @@ -464,6 +472,15 @@ return value; } + protected long readCompKlassAddressValue(long address) + throws UnmappedAddressException, UnalignedAddressException { + long value = readCInteger(address, getKlassPtrSize(), true); + if (value != 0) { + value = (long)(narrowKlassBase + (long)(value << narrowKlassShift)); + } + return value; + } + protected void writeAddressValue(long address, long value) throws UnmappedAddressException, UnalignedAddressException { writeCInteger(address, machDesc.getAddressSize(), value); @@ -551,4 +568,15 @@ public int getNarrowOopShift() { return narrowOopShift; } + + public long getKlassPtrSize() { + return klassPtrSize; + } + + public long getNarrowKlassBase() { + return narrowKlassBase; + } + public int getNarrowKlassShift() { + return narrowKlassShift; + } }