# HG changeset patch # User acorn # Date 1238696802 14400 # Node ID 23276f80d93095934cf92a622acb17c35b5f571a # Parent 956304450e8054cfb66e42e571c5c59cd1d107ce 6825642: nsk sajdi tests fail with NullPointerException Reviewed-by: xlu, coleenp, kamg, swamyv diff -r 956304450e80 -r 23276f80d930 agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java --- a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java Wed Apr 01 16:38:01 2009 -0400 +++ b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java Thu Apr 02 14:26:42 2009 -0400 @@ -306,6 +306,8 @@ 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 956304450e80 -r 23276f80d930 agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Wed Apr 01 16:38:01 2009 -0400 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Thu Apr 02 14:26:42 2009 -0400 @@ -343,13 +343,13 @@ } 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 -r 956304450e80 -r 23276f80d930 src/share/vm/runtime/vmStructs.cpp --- a/src/share/vm/runtime/vmStructs.cpp Wed Apr 01 16:38:01 2009 -0400 +++ b/src/share/vm/runtime/vmStructs.cpp Thu Apr 02 14:26:42 2009 -0400 @@ -1320,7 +1320,6 @@ /****************/ \ \ declare_constant(oopSize) \ - declare_constant(heapOopSize) \ declare_constant(LogBytesPerWord) \ declare_constant(BytesPerLong) \ \