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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 11
    • hotspot
    • None
    • b18

        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.




          1. example-with-classes.txt
            39 kB
            Thomas Stuefe
          2. example-with-classes-verbose.txt
            40 kB
            Thomas Stuefe
          3. example-with-reflection-and-noinflation.txt
            261 kB
            Thomas Stuefe

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

                Created:
                Updated:
                Resolved: