agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java

Print this page
rev 3688 : 7054512: Compress class pointers after perm gen removal
Summary: support of compress class pointers in the compilers.
Reviewed-by:

*** 56,65 **** --- 56,69 ---- // heap data. protected long oopSize; 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; // State for faster accessors that don't allocate memory on each read private boolean useFastAccessors;
*** 157,170 **** (jshortSize == 2)); javaPrimitiveTypesConfigured = true; } ! public void putHeapConst(long heapOopSize, long narrowOopBase, int narrowOopShift) { this.heapOopSize = heapOopSize; this.narrowOopBase = narrowOopBase; this.narrowOopShift = narrowOopShift; } /** May be called by subclasses if desired to initialize the page cache but may not be overridden */ protected final void initCache(long pageSize, long maxNumPages) { --- 161,178 ---- (jshortSize == 2)); javaPrimitiveTypesConfigured = true; } ! 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 cache but may not be overridden */ protected final void initCache(long pageSize, long maxNumPages) {
*** 462,471 **** --- 470,488 ---- value = (long)(narrowOopBase + (long)(value << narrowOopShift)); } 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); }
*** 549,554 **** --- 566,582 ---- return narrowOopBase; } public int getNarrowOopShift() { return narrowOopShift; } + + public long getKlassPtrSize() { + return klassPtrSize; + } + + public long getNarrowKlassBase() { + return narrowKlassBase; + } + public int getNarrowKlassShift() { + return narrowKlassShift; + } }