JDK-7120511 : Add diagnostic commands
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 7u4
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-12-12
  • Updated: 2017-05-16
  • Resolved: 2012-03-29
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 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Description
Add diagnostic commands to the HotSpot JVM to improve the monitoring features available from the jcmd utility.
The list of proposed diagnostic commands for this CR is:

Thread.print
        Print all threads with stacktraces.

GC.class_histogram
        Provides statistics about the Java heap usage

GC.heap_dump
        Generate a HPROF format dump of the Java heap

GC.run_finalization
        Calls java.lang.System.runFinalization().

GC.run
        Calls java.lang.System.gc().

VM.uptime
        Print VM uptime.

VM.flags
        Prints VM flag options and their current values. 

VM.system_properties
        Prints system properties

VM.command_line
        Print the command line used to start this VM instance.

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/4f25538b54c9
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/4f25538b54c9
13-01-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/4f25538b54c9
09-01-2012

EVALUATION Here's the detailed description of the diagnostic commands: Thread.print Print all threads with stacktraces. Impact: Medium: Depends on the number of threads Syntax : No Name [options] Options: (options must be specified using the <key> or <key>=<value> syntax) -l : [optional] print java.util.concurrent lock (BOOLEAN, false) --- GC.class_histogram Provides statistics about the Java heap usage Impact: High: Depends on Java heap size and content Syntax : No Name [options] Options: (options must be specified using the <key> or <key>=<value> syntax) -all : [optional] Inspect all objects, including unreachable objects (BOOLEAN, false) --- GC.heap_dump Generate a HPROF format dump of the Java heap Impact: High: Depends on Java heap size and content Syntax : No Name [options] <filename> Arguments: filename : Name of the dump file (STRING, no default value) Options: (options must be specified using the <key> or <key>=<value> syntax) -all : [optional] Dump all objects, including unreachable objects (BOOLEAN, false) --- GC.run_finalization Calls java.lang.System.runFinalization(). Impact: Medium: Depends on Java content --- GC.run Calls java.lang.System.gc(). Impact: Medium: Depends on Java heap size and content --- VM.uptime Print VM uptime. Impact: Low: Syntax : No Name [options] Options: (options must be specified using the <key> or <key>=<value> syntax) -date : [optional] Add a prefix with current date (BOOLEAN, false) --- VM.flags Prints VM flag options and their current values. Impact: Low: Syntax : No Name [options] Options: (options must be specified using the <key> or <key>=<value> syntax) -all : [optional] Print all flags supported by the VM (BOOLEAN, false) --- VM.system_properties Prints system properties Impact: Low: --- VM.command_line Print the command line used to start this VM instance. Impact: Low:
12-12-2011