JDK-8203682 : Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-05-23
  • Updated: 2021-11-02
  • Resolved: 2018-06-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b18Fixed
Related Reports
Relates :  
Relates :  
Description
It would be helpful, as a complement to VM.classloader_stats, to have a command to print out the class loader hierarchy and class loader details.

In addition, this command should optionally print loaded classes (both non-anonymous and anonymous). 

I have a working prototype of such a command which I would like to contribute. 

Output for a very primitive example:

55223:                                                                                                                                                                                                                                                                                                                   
+--- <bootstrap>
    |   
    +--- platform (instance of jdk.internal.loader.ClassLoaders$PlatformClassLoader)
        |
        +--- app (instance of jdk.internal.loader.ClassLoaders$AppClassLoader)

More complex examples see attached files. 





Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/8e56de95ce10 User: stuefe Date: 2018-06-07 10:24:49 +0000
07-06-2018