Using the -Xdump option

The -Xdump option controls the way you use dump agents and dumps.

The -Xdump option allows you to:

You can have multiple -Xdump options on the command line and also multiple dump types triggered by multiple events. For example:

java -Xgcpolicy:metronome -Xdump:heap:none -Xdump:heap+java:events=vmstart+vmstop <class> [args...]

turns off all Heapdumps and create a dump agent that produces a Heapdump and a Javadump when either a vmstart or vmstop event occurs.

You can use the -Xdump:what option to list the registered dump agents. The registered dump agents listed might be different to those specified because the JVM ensures that multiple -Xdump options are merged into a minimum set of dump agents.

The events keyword is used as the prime trigger mechanism. However, you can use additional keywords to further control the dump produced.

The syntax of the -Xdump option is as follows:

Read syntax diagramSkip visual syntax diagram
-Xdump command-line option syntax

>>--Xdump:------------------------------------------------------>

>--+-help--------------------------------------------------+---><
   +-none--------------------------------------------------+   
   +-events------------------------------------------------+   
   +-request-----------------------------------------------+   
   +-tokens------------------------------------------------+   
   +-dynamic-----------------------------------------------+   
   +-what--------------------------------------------------+   
   | .-+-------.                                           |   
   | V         |                                           |   
   '---<agent>-+-+---------------------------------------+-'   
                 '-:-+-help----------------------------+-'     
                     +-none----------------------------+       
                     +-defaults------------------------+       
                     | .-,---------------------------. |       
                     | |           .-+-----------.   | |       
                     | V           V             |   | |       
                     '---+-events=-----<event>---+-+-+-'       
                         +-exec=<command>----------+           
                         +-file=<filename>---------+           
                         +-filter=<filter>---------+           
                         +-opts=<options>----------+           
                         +-priority=<0-999>--------+           
                         +-range=<ranges>----------+           
                         '-request=<requests>------'           

Users of UNIX® style shells must be aware that unwanted shell expansion might occur because of the characters used in the dump agent options. To avoid unpredictable results, enclose this command line option in quotation marks. For example:
java -Xgcpolicy:metronome "-Xdump:java:events=throw,filter=*Memory*" <Class>
For more information, see the manual for your shell.

Help options

These options display usage and configuration information for dumps, as shown in the following table:

Command Result
-Xdump:help Display general dump help
-Xdump:events List available trigger events
-Xdump:request List additional VM requests
-Xdump:tokens List recognized label tokens
-Xdump:what Show registered agents on startup
-Xdump:<agent>:help Display detailed dump agent help
-Xdump:<agent>:defaults Display default settings for this agent


© Copyright IBM Corporation 2005, 2010. All Rights Reserved.
© Copyright Sun Microsystems, Inc. 1997, 2007, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This information center is powered by Eclipse technology. (http://www.eclipse.org/)