RFR: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
David Holmes
david.holmes at oracle.com
Thu Jan 25 02:30:33 UTC 2018
Hi Jini,
On 25/01/2018 3:43 AM, Jini George wrote:
> Hello,
>
> Requesting reviews for the issue:
>
> SA: clhsdb 'printall' throws ClassCastException while printing out the
> bytecodes
>
> ID: https://bugs.openjdk.java.net/browse/JDK-8175384
> Webrev: http://cr.openjdk.java.net/~jgeorge/8175384/webrev.01/
>
> The issue was seen while printing out the details of the invokevirtual
> bytecode of the java.lang.Enum.values() method. The fix is to avoid a
> ClassCastException by returning the bottom klass in the case of an
> object array klass, while printing out the details.
I'm a bit confused as to what getFieldOrMethodKlassRefAt is supposed to
be returning - should it really be instanceKlass? It's not at all clear
to me that returning the array component type is the right thing to do.
That aside a couple of minor nits:
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ConstantPool.java
! k = (k.isObjArrayKlass())?((ObjArrayKlass)k).getBottomKlass():k;
No () needed around k.isObjArrayKlass()
Spaces needed around the ? and : operators
test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java
Copyright year should now be "2017, 2018,"
Thanks,
David
> Tests run: The SA tests pass with Mach5 and jprt.
>
> Thanks,
> Jini.
More information about the serviceability-dev
mailing list