Tags » Jmap

Heap Dump Generation

Overview:
Java memory model consists of Heap memory, Thread stacks, Perm gen area.
Heap is memory area which is used for allocating memory for class instances and arrays are created. 412 more words

Java

Java process heap dump & its analysis - How to?

First take the heap dump either with,

  1. jmap

JAVA_HOME/bin/jmap -dump:format=b,file=dump.bin
JAVA_HOME/bin/jmap -dump:format=b,file=dump.bin 19225

2. Obtain the heap dump using a java startup parameter

-XX:+HeapDumpOnOutOfMemoryError

3. Parse & Analyse the dump with Eclipse (I have used Memory Analyzer (MAT)), Following diagram should be self explanatory,

Java

Heap dump in Java

jmap -J-d64 -dump:live,format=b,file= 

One can then import the dump to jprofiler or jvisualvm

Java