Friday, July 1, 2011

OSB and WebLogic heap analysis with Eclipse Memory Analyzer Tool

http://eclipse.org/mat/downloads.php


With VisualVM, connect to your server, click on "heap dump" (Monitor tab) and create a file /tmp/heapdump-1309515329556.hprof

copy it to your local machine

Open MAT
click on "Open a Heap Dump" (it will take some time)

you can run the "leak suspect report"

For instance it finds out immediately the huge "memory leak" due to my cached XmlObjects in a Java static HashMap:

One instance of "com.bea.wli.sb.stages.functions.CustomXPathFunctionManagerImpl" loaded by "sun.misc.Launcher$AppClassLoader @ 0x781d06da8" occupies 262,272,104 (36.15%) bytes. The memory is accumulated in one instance of "java.util.HashMap$Entry[]" loaded by "<system class loader>".

Keywords
sun.misc.Launcher$AppClassLoader @ 0x781d06da8
java.util.HashMap$Entry[]
com.bea.wli.sb.stages.functions.CustomXPathFunctionManagerImpl



No comments: