# HG changeset patch # User jcoomes # Date 1241729688 25200 # Node ID a58ad611cc63d74843ff0926efd79fb3a48d2593 # Parent c8f1f4de26c9d68d7d4af1f3b50341bcd6c76003# Parent a2957df801a1a718da7726c759367ab0efc6fc26 Merge diff -r a2957df801a1 -r a58ad611cc63 agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java --- a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java Tue May 05 22:15:35 2009 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java Thu May 07 13:54:48 2009 -0700 @@ -306,8 +306,6 @@ entryAddr = entryAddr.addOffsetTo(intConstantEntryArrayStride); } while (nameAddr != null); - String symbol = "heapOopSize"; // global int constant and value is initialized at runtime. - addIntConstant(symbol, (int)lookupInProcess(symbol).getCIntegerAt(0, 4, false)); } private void readVMLongConstants() { diff -r a2957df801a1 -r a58ad611cc63 agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Tue May 05 22:15:35 2009 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Thu May 07 13:54:48 2009 -0700 @@ -318,11 +318,17 @@ logMinObjAlignmentInBytes = db.lookupIntConstant("LogMinObjAlignmentInBytes").intValue(); heapWordSize = db.lookupIntConstant("HeapWordSize").intValue(); oopSize = db.lookupIntConstant("oopSize").intValue(); - heapOopSize = db.lookupIntConstant("heapOopSize").intValue(); intxType = db.lookupType("intx"); uintxType = db.lookupType("uintx"); boolType = (CIntegerType) db.lookupType("bool"); + + if (isCompressedOopsEnabled()) { + // Size info for oops within java objects is fixed + heapOopSize = (int)getIntSize(); + } else { + heapOopSize = (int)getOopSize(); + } } /** This could be used by a reflective runtime system */ @@ -343,13 +349,12 @@ } soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian()); - debugger.putHeapConst(soleInstance.getHeapOopSize(), Universe.getNarrowOopBase(), - Universe.getNarrowOopShift()); - for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) { ((Observer) iter.next()).update(null, null); } + debugger.putHeapConst(soleInstance.getHeapOopSize(), Universe.getNarrowOopBase(), + Universe.getNarrowOopShift()); } /** This is used by the debugging system */