System dumps are produced in a platform-specific binary format, typically as a raw memory image of the process that was running at the time the dump was initiated. The SDK dump viewer allows you to navigate around the dump, and obtain information in a readable form, with symbolic (source code) data where possible.
You can view Java™ information (for example, threads and objects on the heap) and native information (for example, native stacks, libraries, and raw memory locations).
To use the dump viewer you must first use the jextract tool on the system dump. The jextract tool obtains platform specific information such as word size, endianness, data structure layouts, and symbolic information. It puts this information into an XML file. jextract also collects other useful files, depending on the platform, including trace files and copies of executable files and libraries and, by default, compresses these into a single .zip file for use in subsequent problem diagnosis.
The jextract tool must be run in the same mode (-Xgcpolicy:metronome or not) and the same JVM level (ideally the same machine) that was being used when the dump was produced. The combination of the dump file and the XML file produced by jextract allows the dump viewer (jdmpview) to analyze and display Java information.
-Xdump:system:defaults:request=exclusive+prepwalkSetting this option adds a significant performance reduction when taking a system dump; which could cause problems in rare situations. This option is not enabled by default.
jextract is in the directory sdk/jre/bin.
To use jextract, enter the following at a command prompt:
jextract -Xgcpolicy:metronome <core_file> [<zip_file>]
or
jextract -Xgcpolicy:metronome -nozip <core_file> [<xml_file>]
The jextract tool accepts these parameters:
By default, output is written to a file called <core_file>.zip in the current directory. This file is a compressed file that contains:
You can use the jdmpview tool to analyze the extracted dump locally.
If you run jextract on a JVM level that is different from the one for which the dump was produced you will see the following messages:
J9RAS.buildID is incorrect (found e8801ed67d21c6be, expecting eb4173107d21c673). This version of jextract is incompatible with this dump. Failure detected during jextract, see previous message(s).
The contents of the .zip file produced and the contents of the XML are subject to change, you are advised not to design tools based on the contents of these.
jdmpview is in the directory sdk/bin.
To start jdmpview, from a shell prompt, enter:
jdmpview -Xgcpolicy:metronome -zip <zip file>
or
jdmpview -Xgcpolicy:metronome -core <core file> [-xml <xml file>]
The jdmpview-Xgcpolicy:metronome tool accepts these parameters:
For a list of commands, type "help"; for how to use "help", type "help help" >When you see this message, you can start using commands.
When jdmpview is used with the -zip option, temporary disk space is needed to uncompress the dump files from the compressed file. jdmpview will use the system temporary directory, /tmp on Linux®. An alternative temporary directory can be specified using the Java system property java.io.tmpdir. jdmpview will display an error message if insufficient disk space is available in the temporary directory.
jdmpview -Xgcpolicy:metronome -J-Xmx<n> -zip <zip file>
To
pass command-line arguments to the JVM, you must prefix them with -J.