Module openj9.jvm
Package com.ibm.jvm

Class Trace

java.lang.Object
com.ibm.jvm.Trace

public final class Trace extends Object
The Trace class contains methods for controlling trace and using application trace. This class cannot be instantiated.

The methods set(String cmd), suspend(), resume(), suspendThis(), resumeThis() and snap() are used to control trace by changing the current trace settings, suspending or resuming tracing globally or just for the current thread and by triggering a snap dump of the current trace buffers.

The registerApplication(String name, String[] templates) method allows a new trace component and trace points to be registered with trace.

The trace(int handle, int traceId, ...) methods are used take the application trace points registered by registerApplication(name, formats). The handle value is the integer returned by the registerApplication(name, formats). The traceId is an index into the formats array and the trace(int handle, int traceId, ...) method called must match the types required by the format String formats[traceId].

If the number or types of the parameters passed to trace(int handle, int traceId, ...) do not match the arguments in formats[traceId] a java/lang/IllegalArgumentException will be thrown.