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:
-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>------'
java -Xgcpolicy:metronome "-Xdump:java:events=throw,filter=*Memory*" <Class>For more information, see the manual for your shell.
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 |