diff --git a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java index 82f5ac44d0b8dbe6083066afb0a7fd93e104d903..5e56a0e3f368043a4af77eb5b2c9b9843ffe997b 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java +++ b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java @@ -306,6 +306,8 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase { 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 --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java index b215abcd5a568d105904dc2960fffe1e36b0400f..44fb1a817eaea68e7c7e76b4287d371ec4dd8c7f 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @@ -343,13 +343,13 @@ public class VM { } 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 */ diff --git a/src/share/vm/runtime/vmStructs.cpp b/src/share/vm/runtime/vmStructs.cpp index 7a688dbb33f42c3854ffee263ec64dfdd545b542..2de7bbdf56f1d41f5ef225d0cd497a648d3aeaf1 100644 --- a/src/share/vm/runtime/vmStructs.cpp +++ b/src/share/vm/runtime/vmStructs.cpp @@ -1320,7 +1320,6 @@ static inline uint64_t cast_uint64_t(size_t x) /****************/ \ \ declare_constant(oopSize) \ - declare_constant(heapOopSize) \ declare_constant(LogBytesPerWord) \ declare_constant(BytesPerLong) \ \