NonStop Server for Java 5.1 Programmer's Reference

The -agent:libname Option
To run the HPROF Java profiler, you can use the -agent:libname option on the java command. The
format is:
java -agent:libname=[options]
This option loads the native agent library libname.
For example, to run the HPROF Java profiler, the command is:
java -agent:hprof
For more information, see JVMTI Agent Command Line Options
(http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#starting).
HPROF Output File
Three HPROF examples appear below: CPU samples, CPU times, and a heap for the sites profile. For details
about using HPROF output and interpreting these examples, search for HPROF on the Web. Also, see the paper
Diagnose common runtime problems with hprof
(http://www.javaworld.com/javaworld/jw-12-2001/jw-1207-hprof.html).
Example 1: cpu=samples
TRACE 62:
WorkClass.doSomeWork(WorkClass.java:12)
TestClass.getNew(TestClass.java:16)
...........
CPU SAMPLES BEGIN (total = 331) Wed Dec 19 17:48:51 2001
rank self accum count trace method
1 5.14% 5.14% 17 29 java/util/Random.next
2 4.83% 9.97% 16 62 WorkClass.doSomeWork
3 4.23% 14.20% 14 30 java/util/Random.next
...........
CPU SAMPLES END
Example 2: cpu=times
CPU TIME (ms) BEGIN (total = 2801506) Mon Jan 7 10:41:41 2002
rank self accum count trace method
1 6.89% 6.89% 22920 6668 WorkClass.doSomeThing
2 3.14% 10.03% 2638848 10198 java/util/HashMap.access$2
3 1.70% 11.74% 2639051 16945 java/lang/String.equals
........
CPU TIMES END