JDK-8203455 : jcmd: VM.metaspace: print loader name for anonymous CLDs.
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-05-20
  • Updated: 2018-06-06
  • Resolved: 2018-05-30
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 b16Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
VM.metaspace show-loaders can be used to display loaders (well, really CLD instances).

For anonymous CLDs, only "anonymous" is shown. It would be helpful to show to which loader these CLD are assigned.

Example: 

Before:   "272: ClassLoaderData 0x00007f5ba0538f10 for anonymous class"
After:      "268: CLD 0x00007ff0c45738f0 for <anonymous class>, loaded by app, instance of jdk.internal.loader.ClassLoaders$AppClassLoader"