RFR(s): 8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details

Thomas Stüfe thomas.stuefe at gmail.com
Mon May 28 09:33:40 UTC 2018


Hi Bernd,

definitely. I have two local patches here and corresponding RFEs open:

https://bugs.openjdk.java.net/browse/JDK-8203343
"VM.{metaspace|classloaders} jcmd should show invocation targets for
Generated{Method|Constructor}AccessorImpl classes"
https://bugs.openjdk.java.net/browse/JDK-8203849
"DelegatingClassLoader name could be used to indicate reflected class"

Both complement each other and should make it possible to understand
core reflection class loader issues better.

Nice idea about that folding, I can add this.

I plan to get them upstream for 11, but that may be illusory seeing
how slow reviews are currently going. But certainly 12.

Gruss, Thomas


On Mon, May 28, 2018 at 9:21 AM, Bernd Eckenfels <ecki at zusammenkunft.net> wrote:
> Anything which can be done with the DelegatingClassLoaders (either add Info on their target or collabs them to a „30 x unnamed DelegatingClassloader“. Even in Verbose mode they only reveal their type (constructor,  method) but not much more.
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> ________________________________
> From: serviceability-dev <serviceability-dev-bounces at openjdk.java.net> on behalf of Thomas Stüfe <thomas.stuefe at gmail.com>
> Sent: Monday, May 28, 2018 6:50:34 AM
> To: serviceability-dev at openjdk.java.net serviceability-dev at openjdk.java.net; Hotspot dev runtime
> Subject: Re: RFR(s): 8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
>
> All tests passed on jdk-submit.
>
> Anyone interested in a review?
>
> More output examples for jcmd VM.classloaders :
>
> Spring framework, basic tree:
> http://cr.openjdk.java.net/~stuefe/webrevs/8203682-jcmd-print-classloader-hierarchy/example_spring_short.txt
>
> Spring framework, including all classes:
> http://cr.openjdk.java.net/~stuefe/webrevs/8203682-jcmd-print-classloader-hierarchy/example_spring_long.txt
>
> ... Thomas
>
> On Wed, May 23, 2018 at 2:46 PM, Thomas Stüfe <thomas.stuefe at gmail.com> wrote:
>> Dear all,
>>
>> (not sure if this would be a serviceability or runtime rfe, so sorry
>> for crossposting)
>>
>> may I please have feedback/reviews for this small enhancement.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8203682
>> Webrev: http://cr.openjdk.java.net/~stuefe/webrevs/8203682-jcmd-print-classloader-hierarchy/webrev.00/webrev/
>>
>> This adds a new command to jcmd, "VM.classloaders". It complements the
>> existing command "VM.classloader_stats".
>>
>> This command, in its simplest form, prints the class loader tree. In
>> addition to that, it optionally prints out loaded classes (both
>> non-anonymous and anonymous) and various classloader specific
>> information.
>>
>> Examples:
>>
>> http://cr.openjdk.java.net/~stuefe/webrevs/8203682-jcmd-print-classloader-hierarchy/example.txt
>> http://cr.openjdk.java.net/~stuefe/webrevs/8203682-jcmd-print-classloader-hierarchy/example-with-classes.txt
>> http://cr.openjdk.java.net/~stuefe/webrevs/8203682-jcmd-print-classloader-hierarchy/example-with-reflection-and-noinflation.txt
>>
>>
>> Thanks and Best Regards,
>>
>> Thomas


More information about the serviceability-dev mailing list