aboutsummaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authoracorn <none@none>2009-04-02 14:26:42 -0400
committeracorn <none@none>2009-04-02 14:26:42 -0400
commit8fe14ee11a89ddf2445a0dcb63fdc56e6ba65172 (patch)
treeeaf7b64dd5d04f84a7f7f8673bf10ec720c5f0e6 /agent
parentb2aba5d18f48b0d34a6b19344adc339614371396 (diff)
6825642: nsk sajdi tests fail with NullPointerException
Reviewed-by: xlu, coleenp, kamg, swamyv
Diffstat (limited to 'agent')
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java2
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java6
2 files changed, 5 insertions, 3 deletions
diff --git a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
index 82f5ac44d..5e56a0e3f 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 b215abcd5..44fb1a817 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 */