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.