Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java @ 4772:8f8b94305aff
7129240: backout fix for 7102776 until 7128770 is resolved
Reviewed-by: phh, bobv, coleenp, dcubed
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author | dcubed |
---|---|
date | Wed, 11 Jan 2012 19:54:34 -0800 |
parents | 75c0a73eee98 |
children | f7c4174b33ba |
comparison
equal
deleted
inserted
replaced
4771:22cee0ee8927 | 4772:8f8b94305aff |
---|---|
61 private static int CLASS_STATE_LINKED; | 61 private static int CLASS_STATE_LINKED; |
62 private static int CLASS_STATE_BEING_INITIALIZED; | 62 private static int CLASS_STATE_BEING_INITIALIZED; |
63 private static int CLASS_STATE_FULLY_INITIALIZED; | 63 private static int CLASS_STATE_FULLY_INITIALIZED; |
64 private static int CLASS_STATE_INITIALIZATION_ERROR; | 64 private static int CLASS_STATE_INITIALIZATION_ERROR; |
65 | 65 |
66 private static int IS_MARKED_DEPENDENT_MASK; | |
67 | |
68 private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { | 66 private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { |
69 Type type = db.lookupType("instanceKlass"); | 67 Type type = db.lookupType("instanceKlass"); |
70 arrayKlasses = new OopField(type.getOopField("_array_klasses"), Oop.getHeaderSize()); | 68 arrayKlasses = new OopField(type.getOopField("_array_klasses"), Oop.getHeaderSize()); |
71 methods = new OopField(type.getOopField("_methods"), Oop.getHeaderSize()); | 69 methods = new OopField(type.getOopField("_methods"), Oop.getHeaderSize()); |
72 methodOrdering = new OopField(type.getOopField("_method_ordering"), Oop.getHeaderSize()); | 70 methodOrdering = new OopField(type.getOopField("_method_ordering"), Oop.getHeaderSize()); |
90 innerClasses = new OopField(type.getOopField("_inner_classes"), Oop.getHeaderSize()); | 88 innerClasses = new OopField(type.getOopField("_inner_classes"), Oop.getHeaderSize()); |
91 nonstaticFieldSize = new CIntField(type.getCIntegerField("_nonstatic_field_size"), Oop.getHeaderSize()); | 89 nonstaticFieldSize = new CIntField(type.getCIntegerField("_nonstatic_field_size"), Oop.getHeaderSize()); |
92 staticFieldSize = new CIntField(type.getCIntegerField("_static_field_size"), Oop.getHeaderSize()); | 90 staticFieldSize = new CIntField(type.getCIntegerField("_static_field_size"), Oop.getHeaderSize()); |
93 staticOopFieldCount = new CIntField(type.getCIntegerField("_static_oop_field_count"), Oop.getHeaderSize()); | 91 staticOopFieldCount = new CIntField(type.getCIntegerField("_static_oop_field_count"), Oop.getHeaderSize()); |
94 nonstaticOopMapSize = new CIntField(type.getCIntegerField("_nonstatic_oop_map_size"), Oop.getHeaderSize()); | 92 nonstaticOopMapSize = new CIntField(type.getCIntegerField("_nonstatic_oop_map_size"), Oop.getHeaderSize()); |
95 miscFlags = new CIntField(type.getCIntegerField("_misc_flags"), Oop.getHeaderSize()); | 93 isMarkedDependent = new CIntField(type.getCIntegerField("_is_marked_dependent"), Oop.getHeaderSize()); |
96 initState = new CIntField(type.getCIntegerField("_init_state"), Oop.getHeaderSize()); | 94 initState = new CIntField(type.getCIntegerField("_init_state"), Oop.getHeaderSize()); |
97 vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), Oop.getHeaderSize()); | 95 vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), Oop.getHeaderSize()); |
98 itableLen = new CIntField(type.getCIntegerField("_itable_len"), Oop.getHeaderSize()); | 96 itableLen = new CIntField(type.getCIntegerField("_itable_len"), Oop.getHeaderSize()); |
99 breakpoints = type.getAddressField("_breakpoints"); | 97 breakpoints = type.getAddressField("_breakpoints"); |
100 genericSignature = type.getAddressField("_generic_signature"); | 98 genericSignature = type.getAddressField("_generic_signature"); |
117 CLASS_STATE_LOADED = db.lookupIntConstant("instanceKlass::loaded").intValue(); | 115 CLASS_STATE_LOADED = db.lookupIntConstant("instanceKlass::loaded").intValue(); |
118 CLASS_STATE_LINKED = db.lookupIntConstant("instanceKlass::linked").intValue(); | 116 CLASS_STATE_LINKED = db.lookupIntConstant("instanceKlass::linked").intValue(); |
119 CLASS_STATE_BEING_INITIALIZED = db.lookupIntConstant("instanceKlass::being_initialized").intValue(); | 117 CLASS_STATE_BEING_INITIALIZED = db.lookupIntConstant("instanceKlass::being_initialized").intValue(); |
120 CLASS_STATE_FULLY_INITIALIZED = db.lookupIntConstant("instanceKlass::fully_initialized").intValue(); | 118 CLASS_STATE_FULLY_INITIALIZED = db.lookupIntConstant("instanceKlass::fully_initialized").intValue(); |
121 CLASS_STATE_INITIALIZATION_ERROR = db.lookupIntConstant("instanceKlass::initialization_error").intValue(); | 119 CLASS_STATE_INITIALIZATION_ERROR = db.lookupIntConstant("instanceKlass::initialization_error").intValue(); |
122 | |
123 IS_MARKED_DEPENDENT_MASK = db.lookupIntConstant("instanceKlass::IS_MARKED_DEPENDENT").intValue(); | |
124 | 120 |
125 } | 121 } |
126 | 122 |
127 InstanceKlass(OopHandle handle, ObjectHeap heap) { | 123 InstanceKlass(OopHandle handle, ObjectHeap heap) { |
128 super(handle, heap); | 124 super(handle, heap); |
153 private static OopField innerClasses; | 149 private static OopField innerClasses; |
154 private static CIntField nonstaticFieldSize; | 150 private static CIntField nonstaticFieldSize; |
155 private static CIntField staticFieldSize; | 151 private static CIntField staticFieldSize; |
156 private static CIntField staticOopFieldCount; | 152 private static CIntField staticOopFieldCount; |
157 private static CIntField nonstaticOopMapSize; | 153 private static CIntField nonstaticOopMapSize; |
158 private static CIntField miscFlags; | 154 private static CIntField isMarkedDependent; |
159 private static CIntField initState; | 155 private static CIntField initState; |
160 private static CIntField vtableLen; | 156 private static CIntField vtableLen; |
161 private static CIntField itableLen; | 157 private static CIntField itableLen; |
162 private static AddressField breakpoints; | 158 private static AddressField breakpoints; |
163 private static AddressField genericSignature; | 159 private static AddressField genericSignature; |
335 public Symbol getSourceDebugExtension(){ return getSymbol(sourceDebugExtension); } | 331 public Symbol getSourceDebugExtension(){ return getSymbol(sourceDebugExtension); } |
336 public TypeArray getInnerClasses() { return (TypeArray) innerClasses.getValue(this); } | 332 public TypeArray getInnerClasses() { return (TypeArray) innerClasses.getValue(this); } |
337 public long getNonstaticFieldSize() { return nonstaticFieldSize.getValue(this); } | 333 public long getNonstaticFieldSize() { return nonstaticFieldSize.getValue(this); } |
338 public long getStaticOopFieldCount() { return staticOopFieldCount.getValue(this); } | 334 public long getStaticOopFieldCount() { return staticOopFieldCount.getValue(this); } |
339 public long getNonstaticOopMapSize() { return nonstaticOopMapSize.getValue(this); } | 335 public long getNonstaticOopMapSize() { return nonstaticOopMapSize.getValue(this); } |
340 public boolean getIsMarkedDependent() { return (miscFlags.getValue(this) & IS_MARKED_DEPENDENT_MASK) != 0; } | 336 public boolean getIsMarkedDependent() { return isMarkedDependent.getValue(this) != 0; } |
341 public long getVtableLen() { return vtableLen.getValue(this); } | 337 public long getVtableLen() { return vtableLen.getValue(this); } |
342 public long getItableLen() { return itableLen.getValue(this); } | 338 public long getItableLen() { return itableLen.getValue(this); } |
343 public Symbol getGenericSignature() { return getSymbol(genericSignature); } | 339 public Symbol getGenericSignature() { return getSymbol(genericSignature); } |
344 public long majorVersion() { return majorVersion.getValue(this); } | 340 public long majorVersion() { return majorVersion.getValue(this); } |
345 public long minorVersion() { return minorVersion.getValue(this); } | 341 public long minorVersion() { return minorVersion.getValue(this); } |
526 visitor.doOop(innerClasses, true); | 522 visitor.doOop(innerClasses, true); |
527 visitor.doCInt(nonstaticFieldSize, true); | 523 visitor.doCInt(nonstaticFieldSize, true); |
528 visitor.doCInt(staticFieldSize, true); | 524 visitor.doCInt(staticFieldSize, true); |
529 visitor.doCInt(staticOopFieldCount, true); | 525 visitor.doCInt(staticOopFieldCount, true); |
530 visitor.doCInt(nonstaticOopMapSize, true); | 526 visitor.doCInt(nonstaticOopMapSize, true); |
531 visitor.doCInt(miscFlags, true); | 527 visitor.doCInt(isMarkedDependent, true); |
532 visitor.doCInt(initState, true); | 528 visitor.doCInt(initState, true); |
533 visitor.doCInt(vtableLen, true); | 529 visitor.doCInt(vtableLen, true); |
534 visitor.doCInt(itableLen, true); | 530 visitor.doCInt(itableLen, true); |
535 } | 531 } |
536 } | 532 } |