aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpoonam <none@none>2009-05-04 17:58:10 -0700
committerpoonam <none@none>2009-05-04 17:58:10 -0700
commita39ecde892e19cb46c1b5bc3dc8a3285fa319af5 (patch)
tree3493ae2e70a26434cf14121b1914726d59653390
parentdcd7c07084ceaa08c844cf6fb98bea3ecda0053f (diff)
downloadjdk8u_hotspot-a39ecde892e19cb46c1b5bc3dc8a3285fa319af5.tar.gz
6829234: Refix 6822407 and 6812971
Summary: Fixes two SA issues 6822407 and 6812971 Reviewed-by: swamyv, acorn, kvn, coleenp
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java2
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java13
2 files changed, 9 insertions, 6 deletions
diff --git a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
index 5e56a0e3f..82f5ac44d 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
@@ -306,8 +306,6 @@ 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 44fb1a817..6301b560a 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
@@ -318,11 +318,17 @@ public class VM {
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 @@ 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 */