| Java Heap Dump |
|
|
|
| Wednesday, 30 January 2008 14:32 | |
|
In order to find memory leaks within a java application it is sometimes not enough looking at thread dumps. With tools like visualgc, a tool the see the different memory pools inside a running java app, you can tune the memory setup concering heap size, perm size, survivor ratio, etc., but you can't see which type of objects are causing the heap to fill up. Enable Heap DumpsThere are several possibilities to enable heap dumps. One way is to start to application with -XX:+HeapDumpOnCtrlBreak (Introduced since JDK 1.4.2 update 12 and 5.0 update 7), see for additional information. Another way to get a heap dump of any running java application is using jmap, which is now part of the jdk. jmap -heap:format=b pid writes heap.bin to current directory. Since JDK 1.6 jmap you can use -heap:format=b,file=<heap_dump.out>
|
|
| Last Updated ( Tuesday, 14 April 2009 15:30 ) |


