--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCacheKlass.java Fri Apr 11 09:56:35 2008 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCacheKlass.java Sun Apr 13 17:43:42 2008 -0400
@@ -32,7 +32,7 @@
// A ConstantPoolCacheKlass is the klass of a ConstantPoolCache
-public class ConstantPoolCacheKlass extends ArrayKlass {
+public class ConstantPoolCacheKlass extends Klass {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
@@ -43,13 +43,20 @@
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("constantPoolCacheKlass");
+ headerSize = type.getSize() + Oop.getHeaderSize();
}
ConstantPoolCacheKlass(OopHandle handle, ObjectHeap heap) {
super(handle, heap);
}
+ public long getObjectSize() { return alignObjectSize(headerSize); }
+
public void printValueOn(PrintStream tty) {
tty.print("ConstantPoolCacheKlass");
}
+
+ private static long headerSize;
}
+
+