HP-UX Programmer's Guide for Java 2
Table Of Contents
- Table of Contents
- 1 Introduction
- 2 HotSpot Technology Tools and Commands
- 3 Configuration for Java™ Support
- 4 Performance and Tuning
- 5 Measuring System Performance
- 6 Using Threads
- 7 Using Signals
- 8 Using Java™ 2 JNI on HP-UX
- 9 Expanding Memory
- Determine your requirements
- Memory layout under HP-UX 11.0 (PA-RISC only)
- Additional memory available under HP-UX 11i (PA-RISC only)
- Allocating physical memory and swap in the Java™ heap
- Useful key command-line options for allocating memory
- Application-dependent considerations using large heap size HP-UX 11i PA-RISC
- Expanding heap size in native applications on PA-RISC HP-UX 11.11 and later releases
- Expanding heap size in native applications on Integrity HP-UX 11.23 and later releases
- Expanding heap size in HP-UX PA-RISC
- Expanding heap size in HP-UX Integrity
- 10 Diagnosing Memory Leaks
- A JDK/JRE 6.0.n and 7.0.n Usage Notes
- Using Java 2 JNI on HP-UX
- Garbage collection
- Asian TrueType fonts and Asian locales
- Date/Time methods defaults
- Profiling
- Compatibility with previous releases
- Java Cryptography Extension (JCE) policy files
- Configuring the Java Runtime Plug-In
- CLASSPATH environment variable
- Java Web Start technology usage
- Upgrading from a previous Java Web Start version
- IPv6 support
- Allocation Site Statistics and Zero Preparation -Xverbosegc
- JDK 6.0.04 flags
- GC log-rotation support
- NUMA collector enhancements
- ThreadDumpPath support
- Garbage-First garbage collector (-XX:+UseG1GC)
- jmap, jinfo, and jstack tools included in JDK 6.0.03
- Additional Java Web Start documentation
- B JDK/JRE 5.0.n Usage Notes
- Using Java 2 JNI on HP-UX
- Garbage collectors: Parallel and Concurrent Mark Sweep
- Allocating physical memory and swap in the Java heap
- Asian TrueType fonts and Asian locales
- Date/Time methods defaults
- Profiling
- Closing a socket (PA-RISC only)
- Compatibility with previous releases
- Java Cryptography Extension (JCE) policy files
- Allocation Site Statistics and Zero Preparation -Xverbosegc
- IPv6 support on Java 5.0
- GC log-rotation support in 5.0
- ThreadDumpPath support in 5.0
- Dynamically loaded libraries in 5.0
- Performance improvement for String.intern()
- Configuring the Java Runtime Plug-In
- CLASSPATH environment variable
- Java Web Start technology usage
- C SDK/RTE 1.4.2.n Usage Notes
- Removing support for unwanted architectures in the JRE
- Support for dynamic thread local storage (TLS)
- Signal Chaining functionality
- Using Java 2 JNI on HP-UX
- HotSpot JVM options
- Garbage collectors: Parallel and Concurrent mark sweep
- Allocating physical memory and swap in the Java heap
- Asian TrueType fonts and Asian locales
- Date/Time methods defaults
- Profiling
- Closing a socket when accept or read is pending (PA-RISC) - new patch information!
- Compatibility with previous releases
- Runtime Plug-In usage and configuration
- GC log-rotation support
- ThreadDumpPath support
- D Additional Resources
- Index
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