# HG changeset patch # User kamg # Date 1241711093 14400 # Node ID c8f1f4de26c9d68d7d4af1f3b50341bcd6c76003 # Parent 81a249214991350ffd785b09cbac0b85a945a070# Parent 51285b431bb268bf02d0461e6b27c4b7f992c3c7 Merge diff -r 51285b431bb2 -r c8f1f4de26c9 agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java --- a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java Mon May 04 02:57:39 2009 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java Thu May 07 11:44:53 2009 -0400 @@ -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 51285b431bb2 -r c8f1f4de26c9 agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Mon May 04 02:57:39 2009 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Thu May 07 11:44:53 2009 -0400 @@ -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 */