Hi everyone,

Could I have a few reviews for this change, please?

Webrev: http://cr.openjdk.java.net/~kmo/8011979/webrev.00/
CR: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8011979

Description: (copied from the CR)

Currently it's hard to tell from the output of sun.jvm.hotspot.oops.Instance.printValueOn() what type a java.lang.Class instance (Java mirror) represents.

e.g. in a CLHSDB session:

hsdb> class java.lang.Long
java/lang/Long @0x000000077ec0f9b0
hsdb> inspect 0x000000077ec0f9b0
Type is InstanceKlass (size of 472)
...
oop Klass::_java_mirror: Oop for java/lang/Class @ 0x00000007d7002fd8 Oop for java/lang/Class @ 0x00000007d7002fd8
...
hsdb> inspect 0x00000007d7002fd8
instance of Oop for java/lang/Class @ 0x00000007d7002fd8 @ 0x00000007d7002fd8 (size = 128)
...
TYPE: Oop for java/lang/Class @ 0x00000007d70002b0 Oop for java/lang/Class @ 0x00000007d70002b0
...


It is preferable to display the name of the type in Instance.printValueOn() for Java mirrors, so that the aforementioned example becomes:

hsdb> class java.lang.Long
java/lang/Long @0x000000077ec0f9b0
hsdb> inspect 0x000000077ec0f9b0
Type is InstanceKlass (size of 472)
...
oop Klass::_java_mirror: Class of [java/lang/Long] @ 0x00000007d7002fd8 Oop for java/lang/Class @ 0x00000007d7002fd8
...
hsdb> inspect 0x00000007d7002fd8
instance of Class of [java/lang/Long] @ 0x00000007d7002fd8 @ 0x00000007d7002fd8 (size = 128)
...
TYPE: Class of primitive type long @ 0x00000007d70002b0 Oop for java/lang/Class @ 0x00000007d70002b0
...

I'm open to suggestions of the format of the special-cased message.

Testing:
Testing with JPRT.
Hand-tested the example case in the description.

Thanks,
Kris

Reply via email to