NonStop Server for Java 4.2 Programmer's Reference
java command:
java -Xrunhprof:special
Note: These options are only for cpu=samples.
The only and skip options can be repeated to cover multiple threads, but not mixed. You can start or stop
sampling at only once.
period=num ms
Specifies the time between samples. The default interval is 100 milliseconds.
only=thread-name
Sets the sample to only the given thread. You can repeat this option to specify more than one thread. A
thread specified in this option cannot also be specified in the skip option.
skip=thread-name
Sets skip sampling this thread. You can repeat this option to specify more than one thread. A thread set to
be skipped cannot also be used in the only option.
from=full-method-name
Specifies to start sampling when this method is entered.
fexit=full-method-name
Specifies to start sampling when this method exits.
upto=full-method-name
Specifies to stop and generate a dump when this method is entered.
toexit=full-method-name
Specifies to stop and generate a dump when this method exits.
Example
The following command shows using the fexit, upto, and only special options.
java -Xrunhprof:fexit=Test1.init,upto=Queue.cleanup,only=MyThread Test1
For more information, see the HPROF Profiler Agent described under Java Virtual Machine Profiler Interface
Machine Profiler Interface (JVMPI) (http://java.sun.com/j2se/1.4.2/docs/guide/jvmpi/jvmpi.html).
Tips
In the java command, specify no compiler:
-Djava.compiler=NONE
●
In Java native code (JNI), the CPU options also time native code where line-number information is not
available.
●
CPU time is not measured when process is blocked, for example, on a call to SQL.●
To dump profiling information before the program exits:
Be sure to specify the -Xrunhprof option.
❍
For sampling only, you can use a special option, such as upto and toexit.❍
●