Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203682

Add jcmd "VM.classloaders" command to print out class loader hierarchy, details

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b18

      Backports

        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.




          Attachments

            Issue Links

              Activity

                People

                Assignee:
                stuefe Thomas Stuefe
                Reporter:
                stuefe Thomas Stuefe
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: