Specifying trace options

The preferred way to control trace is through trace options that you specify by using the -Xtrace option on the launcher command line, or by using the IBM_JAVA_OPTIONS environment variable.

Some trace options have the form <name> and others are of the form <name>=<value>, where <name> is case-sensitive. Except where stated, <value> is not case-sensitive; the exceptions to this rule are file names on some platforms, class names, and method names.

If an option value contains commas, it must be enclosed in braces. For example:
methods={java/lang/*,com/ibm/*}
Note: The requirement to use braces applies only to options specified on the command line. You do not need to use braces for options specified in a properties file.
The syntax for specifying trace options depends on the launcher. Usually, it is:
java -Xgcpolicy:metronome -Xtrace:<name>,<another_name>=<value> HelloWorld
To switch off all tracepoints, use this option:
java -Xgcpolicy:metronome -Xtrace:none=all

If you specify other tracepoints without specifying -Xtrace:none, the tracepoints are added to the default set.

When you use the IBM_JAVA_OPTIONS environment variable, use this syntax:
set IBM_JAVA_OPTIONS=-Xtrace:<name>,<another_name>=<value>
or
export IBM_JAVA_OPTIONS=-Xtrace:<name>,<another_name>=<value>
If you use UNIX® style shells, note that unwanted shell expansion might occur because of the characters used in the trace options. To avoid unpredictable results, enclose this command-line option in quotation marks. For example:
java -Xgcpolicy:metronome "-Xtrace:<name>,<another_name>=<value>" HelloWorld
For more information, see the manual for your shell.


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