
The HPROF Profiler
114 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001
Also, update the PATH and NSES_CLASSPATH system variables to include the
profiler’s own jar files and dll files.
The HPROF Profiler
HPROF is a simple profiler agent shipped with the Java 2 SDK. It is a dynamically
linked library that interacts with the JVMPI and writes out profiling information
either to a file or to a socket in ASCII or binary format. This information can be
further processed by a profiler front-end tool such as HAT.
HPROF can present CPU usage, heap allocation statistics, and monitor contention
profiles. In addition, it can also report complete heap dumps and states of all the
monitors and threads in the Java virtual machine. For more details on the HPROF
profiler, see the JDK documentation at:
http://java.sun.com/products/jdk/1.2/docs/guide/jvmpi/jvmpi.html#hprof
To use HPROF profiling on Unix, follow these steps:
1. To enable HPROF profiling, edit the jvm12.conf file as shown here:
Suggested options for using iPlanet Web Server with HPROF are:
jvm.option=-Xrunhprof:file=/tmp/hprof.txt,heap=all,format=a
or:
jvm.option=-Xrunhprof:file=/tmp/hprof.txt,cpu=samples,format=a
NOTE If any of the configuration options are missing or incorrect, the
profiler may experience problems that affect the performance of the
iPlanet Web Server.
jvm.printErrors=2
jvm.profiler=hprof
jvm.option=-Xrunhprof:options
#jvm.option=-Xrs must be commented out
java.compiler=NONE
Commenti su questo manuale