comparison agent/src/share/classes/sun/jvm/hotspot/oops/ArrayKlass.java @ 11096:71180a6e5080

7133260: AllocationProfiler uses space in metadata and doesn't seem to do anything useful. Summary: Remove -Xaprof and Klass::_alloc_count & ArrayKlass::_alloc_size. Reviewed-by: stefank, coleenp
author jiangli
date Wed, 03 Jul 2013 17:26:59 -0400
parents d8ce2825b193
children de6a9e811145
comparison
equal deleted inserted replaced
11065:cedf20e2a655 11096:71180a6e5080
47 Type type = db.lookupType("ArrayKlass"); 47 Type type = db.lookupType("ArrayKlass");
48 dimension = new CIntField(type.getCIntegerField("_dimension"), 0); 48 dimension = new CIntField(type.getCIntegerField("_dimension"), 0);
49 higherDimension = new MetadataField(type.getAddressField("_higher_dimension"), 0); 49 higherDimension = new MetadataField(type.getAddressField("_higher_dimension"), 0);
50 lowerDimension = new MetadataField(type.getAddressField("_lower_dimension"), 0); 50 lowerDimension = new MetadataField(type.getAddressField("_lower_dimension"), 0);
51 vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), 0); 51 vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), 0);
52 allocSize = new CIntField(type.getCIntegerField("_alloc_size"), 0);
53 componentMirror = new OopField(type.getOopField("_component_mirror"), 0); 52 componentMirror = new OopField(type.getOopField("_component_mirror"), 0);
54 javaLangCloneableName = null; 53 javaLangCloneableName = null;
55 javaLangObjectName = null; 54 javaLangObjectName = null;
56 javaIoSerializableName = null; 55 javaIoSerializableName = null;
57 } 56 }
62 61
63 private static CIntField dimension; 62 private static CIntField dimension;
64 private static MetadataField higherDimension; 63 private static MetadataField higherDimension;
65 private static MetadataField lowerDimension; 64 private static MetadataField lowerDimension;
66 private static CIntField vtableLen; 65 private static CIntField vtableLen;
67 private static CIntField allocSize;
68 private static OopField componentMirror; 66 private static OopField componentMirror;
69 67
70 public Klass getJavaSuper() { 68 public Klass getJavaSuper() {
71 SystemDictionary sysDict = VM.getVM().getSystemDictionary(); 69 SystemDictionary sysDict = VM.getVM().getSystemDictionary();
72 return sysDict.getObjectKlass(); 70 return sysDict.getObjectKlass();
74 72
75 public long getDimension() { return dimension.getValue(this); } 73 public long getDimension() { return dimension.getValue(this); }
76 public Klass getHigherDimension() { return (Klass) higherDimension.getValue(this); } 74 public Klass getHigherDimension() { return (Klass) higherDimension.getValue(this); }
77 public Klass getLowerDimension() { return (Klass) lowerDimension.getValue(this); } 75 public Klass getLowerDimension() { return (Klass) lowerDimension.getValue(this); }
78 public long getVtableLen() { return vtableLen.getValue(this); } 76 public long getVtableLen() { return vtableLen.getValue(this); }
79 public long getAllocSize() { return allocSize.getValue(this); }
80 public Oop getComponentMirror() { return componentMirror.getValue(this); } 77 public Oop getComponentMirror() { return componentMirror.getValue(this); }
81 78
82 // constant class names - javaLangCloneable, javaIoSerializable, javaLangObject 79 // constant class names - javaLangCloneable, javaIoSerializable, javaLangObject
83 // Initialized lazily to avoid initialization ordering dependencies between ArrayKlass and SymbolTable 80 // Initialized lazily to avoid initialization ordering dependencies between ArrayKlass and SymbolTable
84 private static Symbol javaLangCloneableName; 81 private static Symbol javaLangCloneableName;
145 super.iterateFields(visitor); 142 super.iterateFields(visitor);
146 visitor.doCInt(dimension, true); 143 visitor.doCInt(dimension, true);
147 visitor.doMetadata(higherDimension, true); 144 visitor.doMetadata(higherDimension, true);
148 visitor.doMetadata(lowerDimension, true); 145 visitor.doMetadata(lowerDimension, true);
149 visitor.doCInt(vtableLen, true); 146 visitor.doCInt(vtableLen, true);
150 visitor.doCInt(allocSize, true);
151 visitor.doOop(componentMirror, true); 147 visitor.doOop(componentMirror, true);
152 } 148 }
153 } 149 }