JDK-8044107 : Add Diagnostic Command to list all ClassLoaders
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-05-28
  • Updated: 2018-05-14
  • Resolved: 2014-06-04
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 8 JDK 9
8u172Fixed 9 b22Fixed
Related Reports
Relates :  
Description
The command should mimic the behavior of the "jmap -clstats" option which uses SA to list all ClassLoaders.

It could look something like this:

$ jcmd Sleeper GC.classloader_stats
74864:
ClassLoader         Parent              CLData*            Classes   ChunkSz   BlockSz  Type
0x0000000000000000  0x0000000000000000  0x00007f927ad0c028     569    393216    358760  <boot classloader>
0x00000007c0037f20  0x00000007c002ebf0  0x00007f927af0fda8       1      2048       512  sun.misc.Launcher$AppClassLoader
0x00000007c002ebf0  0x0000000000000000  0x0000000000000000       0         0         0  sun.misc.Launcher$ExtClassLoader
Total = 3                                                      570    395264    359272