changeset 692:23276f80d930

6825642: nsk sajdi tests fail with NullPointerException Reviewed-by: xlu, coleenp, kamg, swamyv
author acorn
date Thu, 02 Apr 2009 14:26:42 -0400
parents 956304450e80
children 2c1dbb844832
files agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java src/share/vm/runtime/vmStructs.cpp
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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() {
--- 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 */
--- 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)                                          \
                                                                           \