You enable tracepoints by specifying component and tracepoint.
If no qualifier parameters are entered, all tracepoints are enabled,
except for exception.output trace, where the
default is all {exception}.
The
<tracepoint_specification> is as follows:
[!]<component>[{<type>}] or [!]<tracepoint_id>[,...]
where:
- !
- is a logical not. That is, the tracepoints that are specified
immediately following the ! are turned off.
- <component>
- is one of:
- all
- The JVM subcomponent (that is, dg, j9trc, j9vm, j9mm, j9bcu, j9vrb,
j9shr, j9prt, java,awt, awt_dnd_datatransfer, audio, mt, fontmanager,
net, awt_java2d, awt_print, or nio)
- <type>
- is the tracepoint type or group. The following types are
supported:
- Entry
- Exit
- Event
- Exception
- Mem
- A group of tracepoints that have been specified by use of a group
name. For example, nativeMethods select the group of tracepoints in
MT (Method Trace) that relate to native methods. The following groups
are supported:
- compiledMethods
- nativeMethods
- staticMethods
- <tracepoint_id>
- is the tracepoint identifier. This constitutes the component name
of the tracepoint, followed by its integer number inside that component.
For example, j9mm.49, j9shr.20-29, j9vm.15, To understand these numbers,
see Determining the tracepoint ID of a tracepoint.
Some tracepoints can be both an exit and an exception;
that is, the function ended with an error. If you specify either exit
or exception, these tracepoints will be included.
The following tracepoint specification used in Java™ 5.0 and earlier IBM® SDKs is still supported:
[!]tpnid{<tracepoint_id>[,...]}
Examples
- All tracepoints:
-Xtrace:maximal
- All tracepoints except j9vrb and j9trc:
-Xtrace:minimal={all,!j9vrb,!j9trc}
- All entry and exit tracepoints in j9bcu:
-Xtrace:maximal={j9bcu{entry},j9bcu{exit}}
- All tracepoints in j9mm except tracepoints 20-30:
-Xtrace:maximal=j9mm,maximal=!j9mm.20-30
- Tracepoints j9prt.5 through j9prt.15:
-Xtrace:print=j9prt.5-15
- All j9trc tracepoints:
-Xtrace:count=j9trc
- All entry and exit tracepoints:
-Xtrace:external={all{entry},all{exit}}
- All exception tracepoints:
-Xtrace:exception
or
-Xtrace:exception=all{exception}
- All exception tracepoints in j9bcu:
-Xtrace:exception=j9bcu
- Tracepoints j9prt.15 and j9shr.12:
-Xtrace:exception={j9prt.15,j9shr.12}