HP-UX Programmer's Guide for Java 2

Table Of Contents
Unlimited strength jurisdiction policy files may be downloaded from the JavaSoft Web
site.
Allocation Site Statistics and Zero Preparation -Xverbosegc
NOTE: To properly view Zero Preparation -Xverbosegc and Allocation Statistics
information, you must use HPjmeter 3.1 or later.
Starting with the JDK 5.0.14 release, you can prompt the JVM to emit HP -Xverbosegc
information for Java applications started without -Xverbosegc. Zero Preparation
-Xverbosegc allows you to obtain -Xverbosegc information from the JVM by
sending the running Java program a SIGPROF signal. For example, assuming the
running Java process ID is 6754, then, executing either of the two actions listed below
prompts the JVM to start emitting detailed HP -Xverbosegc information:
kill -21 6754
kill -s sigprof 6754
Issuing a second SIGPROF signal to the running Java program prompts the JVM to
stop emitting the -Xverbosegc information. Similarly, issuing yet another SIGPROF
signal to the running process prompts the JVM to start issuing -Xverbosegc
information one more time.
Additionally, starting with this release, and only if you had started the Java application
with -XX:+PrintAllocStatistics, when zero preparation -Xverbosegc is
enabled as specified in the previous paragraph, the JVM also emits detailed allocation
site statistics.
If you start your application with -XX:+PrintAllocStatistics, and if you do not
specify -Xverbosegc, or send the running process a SIGPROF signal, then the JVM
will emit allocation site statistics to standard out when the application terminates. (That
is, when the Java process stops running.) If you do not want to wait for the application
to terminate, or if the application is designed to be long running (or does not terminate),
then you can obtain allocation site statistics by sending the running Java program a
SIGPROF as described above.
Unlike -Xverbosegc information emission in zero preparation mode, which is started
with a SIGPROF and stopped with a second SIGPROF, when
-XX:+PrintAllocStatistics is specified, allocation site statistics is emitted every
time the JVM receives a SIGPROF.
When -XX:+PrintAllocStatistics is specified along with -Xverbosegc,
allocation site statistics data are directed to the same output specified for HP
-Xverbosegc. If no output file is specified, allocation site statistics are directed to
standard out (to the terminal where the program was started from). When
-XX:+PrintAllocStatistics is specified alone (without -Xverbosegc on the
command line), allocation site statistics are directed to standard out (to the terminal).
When a SIGPROF signal is sent to a running Java process that was originally started
with -XX:+PrintAllocStatistics on the command line, the SIGPROF signal will
also enable -Xverbosegc data collection if -Xverbosegc was not specified on the
command line when the program was started, and the output of both -Xverbosegc
84 JDK/JRE 5.0.n Usage Notes