jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace - JVM Stack Tracer


How to run "jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace" tool from JDK lib\modules JImage file?

✍: FYIcenter


"jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace" tool allows you to print out stack trace of a given JVM process.

"jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace" tool is supported by the jmods\jdk.hotspot.agent.jmod module file, which is also linked into the lib\modules JImage file in JDK 9, 10, and 11.

You can run the "jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace" tool using the lib\modules JImage file as described below using JDK 11 as an example:

C:\fyicenter>set JDK_HOME=\fyicenter\jdk-11.0.1

C:\fyicenter>%JDK_HOME%\bin\java --module jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace

Usage: java sun.jvm.hotspot.tools.StackTrace [option] <pid>
                (to connect to a live java process)
   or java sun.jvm.hotspot.tools.StackTrace [option] <executable> <core>
                (to connect to a core file)
   or java sun.jvm.hotspot.tools.StackTrace [option] [server_id@]<remote server IP or hostname>
                (to connect to a remote debug server)

where option must be one of:
    -h | -help  to print this help message


⇒ jdk.hotspot.agent/sun.jvm.hotspot.tools.SysPropsDumper - JVM Properties Dumper

⇐ jdk.hotspot.agent/sun.jvm.hotspot.tools.jcore.ClassDump - JVM Class Dumper

⇑ Tools Supported from JDK 9+ lib\modules JImage

⇑⇑ FAQ for JDK (Java Development Kit)

2019-09-16, 1124👍, 0💬