HP-UX Programmer's Guide for Java 2

Table Of Contents
The option -XX:+HeapDumpOnCtrlBreak is available starting with SDK 1.4.2.11 and
JDK 5.0.05.
See the “Interaction of HeapDump Options” section.
-XX:+HeapDumpOnOutOfMemoryError
The HeapDumpOnOutOfMemoryError command-line option causes the JVM to dump
a snapshot of the Java™ heap when an Out Of Memory error condition has been reached.
The heap dump format generated by HeapDumpOnOutOfMemoryError is in hprof
binary format, and is written to filename java_pid<pid>.hprof in the current
working directory.
The option -XX:HeapDumpPath=<file> can be used to specify the dump filename
or the directory where the dump file is created. Running with application with
-XX:+HeapDumpOnOutOfMemoryError does not impact performance. Please note
the following known issue: The HeapDumpOnOutOfMemoryError option does not
work with the low-pause collector (-XX:+UseConcMarkSweepGC). This option is
available starting with the SDK 1.4.2.11 and JDK 5.0.04 releases.
Interaction of HeapDump options
If the HP environment variable _JAVA_HEAPDUMP is set and the option
-XX:+HeapDumpOnCtrl is specified, then both the HP ascii and JS hprof binary
formats will be emitted when signal -3 is sent to the process:
java_pid27298.hprof.1152743593943
java_27298_060712_153313_heapDump.hprof.txt
If only the binary format heap dump is desired (on SIGQUIT), then set only
_JAVA_BINARY_HEAPDUMP environment variable, or use
-XX:+HeapDumpOnCtrl(without setting _JAVA_HEAPDUMP environment variable).
If _JAVA_BINARY_HEAPDUMP is set and -Xrunhprof:heap=dump is set, then both
the runhprof ascii-based and HP binary files are produced.
If _JAVA_HEAPDUMP_ONLY is set then the Heap Dumps are triggered via the
SIGVTALRM signal (20), instead of SIGQUIT (3); then only the heapdump is
produced (thread and trace dump to stdout of app is supressed);
_JAVA_HEAPDUMP_ONLY and _JAVA_BINARY_HEAPDUMP will produce a binary
format heap dump when SIGVTALRM is sent to the process. No thread trace is generated
to stdout.
-XX:MainThreadStackSize=<value>
Specifies the main/primordial thread stack size. The main/primordial thread is the first
thread when a process is created. It is the thread that has the main method. Other Java™
threads are controlled by -Xss<size>. For more information, see “Main/primordial
thread stack size limits” (page 57).
-XX:MaxDirectMemorySize=<size>
Standard and non-standard options 23