Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java @ 2411:63997f575155
7031614: jmap -permstat fails with java.lang.InternalError in sun.jvm.hotspot.oops.OopField.getValue
Reviewed-by: kvn, dcubed
author | never |
---|---|
date | Wed, 30 Mar 2011 07:47:19 -0700 |
parents | c7f3d0b4570f |
children | e6b1331a51d2 |
comparison
equal
deleted
inserted
replaced
2410:fe1dbd98e18f | 2411:63997f575155 |
---|---|
238 return result; | 238 return result; |
239 } | 239 } |
240 | 240 |
241 // Byteside of the header | 241 // Byteside of the header |
242 private static long headerSize; | 242 private static long headerSize; |
243 | |
244 public long getObjectSize(Oop object) { | |
245 return getSizeHelper() * VM.getVM().getAddressSize(); | |
246 } | |
243 | 247 |
244 public static long getHeaderSize() { return headerSize; } | 248 public static long getHeaderSize() { return headerSize; } |
245 | 249 |
246 // Accessors for declared fields | 250 // Accessors for declared fields |
247 public Klass getArrayKlasses() { return (Klass) arrayKlasses.getValue(this); } | 251 public Klass getArrayKlasses() { return (Klass) arrayKlasses.getValue(this); } |
457 visitor.doCInt(isMarkedDependent, true); | 461 visitor.doCInt(isMarkedDependent, true); |
458 visitor.doCInt(initState, true); | 462 visitor.doCInt(initState, true); |
459 visitor.doCInt(vtableLen, true); | 463 visitor.doCInt(vtableLen, true); |
460 visitor.doCInt(itableLen, true); | 464 visitor.doCInt(itableLen, true); |
461 } | 465 } |
462 | 466 } |
467 | |
468 /* | |
469 * Visit the static fields of this InstanceKlass with the obj of | |
470 * the visitor set to the oop holding the fields, which is | |
471 * currently the java mirror. | |
472 */ | |
473 public void iterateStaticFields(OopVisitor visitor) { | |
474 visitor.setObj(getJavaMirror()); | |
475 visitor.prologue(); | |
476 iterateStaticFieldsInternal(visitor); | |
477 visitor.epilogue(); | |
478 | |
479 } | |
480 | |
481 void iterateStaticFieldsInternal(OopVisitor visitor) { | |
463 TypeArray fields = getFields(); | 482 TypeArray fields = getFields(); |
464 int length = (int) fields.getLength(); | 483 int length = (int) fields.getLength(); |
465 for (int index = 0; index < length; index += NEXT_OFFSET) { | 484 for (int index = 0; index < length; index += NEXT_OFFSET) { |
466 short accessFlags = fields.getShortAt(index + ACCESS_FLAGS_OFFSET); | 485 short accessFlags = fields.getShortAt(index + ACCESS_FLAGS_OFFSET); |
467 short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); | 486 short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); |
475 | 494 |
476 public Klass getJavaSuper() { | 495 public Klass getJavaSuper() { |
477 return getSuper(); | 496 return getSuper(); |
478 } | 497 } |
479 | 498 |
480 public void iterateNonStaticFields(OopVisitor visitor) { | 499 public void iterateNonStaticFields(OopVisitor visitor, Oop obj) { |
481 if (getSuper() != null) { | 500 if (getSuper() != null) { |
482 ((InstanceKlass) getSuper()).iterateNonStaticFields(visitor); | 501 ((InstanceKlass) getSuper()).iterateNonStaticFields(visitor, obj); |
483 } | 502 } |
484 TypeArray fields = getFields(); | 503 TypeArray fields = getFields(); |
485 | 504 |
486 int length = (int) fields.getLength(); | 505 int length = (int) fields.getLength(); |
487 for (int index = 0; index < length; index += NEXT_OFFSET) { | 506 for (int index = 0; index < length; index += NEXT_OFFSET) { |