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

Thomas Stüfe thomas.stuefe at gmail.com
Wed May 23 12:46:13 UTC 2018


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