Using the trace formatter

The trace formatter is a Java™ program that converts binary trace point data in a trace file to a readable form. The formatter requires the J9TraceFormat.dat file, which contains the formatting templates. The formatter produces a file containing header information about the JVM that produced the binary trace file, a list of threads for which trace points were produced, and the formatted trace points with their timestamp, thread ID, trace point ID and trace point data.

To use the trace formatter on a binary trace file type:
java com.ibm.jvm.format.TraceFormat -Xgcpolicy:metronome <input_file>  [<output_file>] [options]
where <input_file> is the name of the binary trace file to be formatted, and <output_file> is the name of the output file.

If you do not specify an output file, the output file is called <input_file>.fmt.

The size of the heap needed to format the trace is directly proportional to the number of threads present in the trace file. For large numbers of threads the formatter might run out of memory, generating the error OutOfMemoryError. In this case, increase the heap size using the -Xmx option.

Available options

The following options are available with the trace formatter:
-datdir <directory>
Selects an alternative formatting template file directory. The directory must contain the J9TraceFormat.dat file.
-help
Displays usage information.
-indent
Indents trace messages at each Entry trace point and outdents trace messages at each Exit trace point. The default is not to indent the messages.
-overridetimezone <hours>
Add <hours> hours to formatted tracepoints, the value can be negative. This option allows the user to override the default time zone used in the formatter (UTC).
-summary
Prints summary information to the screen without generating an output file.
-thread: <thread id>[,<thread id>]...
Filters the output for the given thread IDs only. thread id is the ID of the thread, which can be specified in decimal or hex (0x) format. Any number of thread IDs can be specified, separated by commas.
-uservmid <string>
Inserts <string> in each formatted tracepoint. The string aids reading or parsing when several different JVMs or JVM runs are traced for comparison.


© 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/)