By default, a Heapdump is produced when the Java™ heap is exhausted. Heapdumps can be generated in other situations by use of -Xdump:heap.
See Using dump agents for more detailed information about generating dumps based on specific events. Heapdumps can also be generated programmatically by use of the com.ibm.jvm.Dump.HeapDump() method from inside the application code.
To see which events will trigger a dump, use -Xdump:what. See Using dump agents for more information.
By default, Heapdumps are produced in PHD format. To produce Heapdumps in text format, see Enabling text formatted ("classic") Heapdumps.
Environment variables can also affect the generation of Heapdumps (although this is a deprecated mechanism). See Environment variables and Heapdump for more details.