How can I get an HPROF heap dump?
Are you running an AS Java Weekstone with SAP JVM...
...or a plain Java Application?
All options to get an HPROF dump in detail...
via Java VM parameters (see ConfigTool on how to set those for AS Java installations):
Heap dump will be written to the working directory.
If you run into problems opening a heap dump with the SAP Memory Analyzer (Error message: "Unrecognized heap dump sub-record type"), please let us know. This indicates a corrupt heap dump file. In this case we would like to learn which tool/approach you have chosen to dump the heap.
When HPROF heap dumps are NOT written on OutOfMemoryError?
Heap dumps are not written on OutOfMemoryError for the following reasons:
As for the C heap, the best way to see that you won't get a heap dump is if it happens in C code (eArray.cpp in the example below):
C heap problems may arise for different reasons, e.g. out of swap space situations, process limits exhaustion or just address space limitations, e.g. heavy fragmentation or just the depletion of it on machines with limited address space like 32 bit machines. The hs_err-file will help you with more information on this type of error. Java heap dumps wouldn't be of any help, anyways.
Also please note that a heap dump is written only on the first OutOfMemoryError. If the application chooses to catch it and continues to run, the next OutOfMemoryError will never cause a heap dump to be written!
How can I get an IBM system dump?
How to get an IBM system dump to be analyzed with Memory Analyzer + DTFJ Adapter depends on the concrete IBM system / JVM. The following resources should provide the necessary description: