When using "dead" code linktime elimination (linker flag -Wl,--gc-sections) we see a number of hotspot jtreg tests fail.
They are related to the serviceability agent.
Example serviceability/sa/CDSJMapClstats
[2026-02-26T15:48:28.867332189Z] Gathering output for process 2349301
[2026-02-26T15:48:28.867983029Z] Waiting for completion for process 2349301
[2026-02-26T15:48:29.341213744Z] Waiting for completion finished for process 2349301
Output and diagnostic info for process 2349301 was saved into 'pid-2349301-output.log'
Attaching to process ID 2341040, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 27.0.0.1-internal-adhoc.d040975.jdk
finding class loader instances ..java.lang.InternalError: Metadata does not appear to be polymorphic
at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:223)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:104)
at jdk.hotspot.agent/sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:77)
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.getClassLoaderKlass(SystemDictionary.java:102)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.ClassLoaderStats.printClassLoaderStatistics(ClassLoaderStats.java:93)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.ClassLoaderStats.run(ClassLoaderStats.java:78)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.run(JMap.java:121)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.main(JMap.java:202)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJMAP(SALauncher.java:344)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:507)
( Similar issues have been observed previously when using lto on libjvm )
They are related to the serviceability agent.
Example serviceability/sa/CDSJMapClstats
[2026-02-26T15:48:28.867332189Z] Gathering output for process 2349301
[2026-02-26T15:48:28.867983029Z] Waiting for completion for process 2349301
[2026-02-26T15:48:29.341213744Z] Waiting for completion finished for process 2349301
Output and diagnostic info for process 2349301 was saved into 'pid-2349301-output.log'
Attaching to process ID 2341040, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 27.0.0.1-internal-adhoc.d040975.jdk
finding class loader instances ..java.lang.InternalError: Metadata does not appear to be polymorphic
at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:223)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:104)
at jdk.hotspot.agent/sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:77)
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.getClassLoaderKlass(SystemDictionary.java:102)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.ClassLoaderStats.printClassLoaderStatistics(ClassLoaderStats.java:93)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.ClassLoaderStats.run(ClassLoaderStats.java:78)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.run(JMap.java:121)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.main(JMap.java:202)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJMAP(SALauncher.java:344)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:507)
( Similar issues have been observed previously when using lto on libjvm )
- relates to
-
JDK-8017234 Hotspot should stop using mapfiles
-
- Resolved
-
-
JDK-8236714 enable link-time section-gc for linux to remove unused code
-
- Resolved
-