Search code examples
heap-dumpeclipse-memory-analyzer

How to open eclipse memory anaylzer index files in eclipse


I've heap dump file testdump.hprof. I parsed this file using below command.

./ParseHeapDump.sh /home/rajkumar/Documents/heap-dump-ads03/testdump.hprof

The above command generated the below files.

testdump.threads

testdump.idx.index

testdump.o2c.index

testdump.a2s.index

testdump.inbound.index

testdump.outbound.index

testdump.o2hprof.index

testdump.index

testdump.domIn.index

testdump.o2ret.index

testdump.domOut.index

I've installed eclipse memory analyzer plugin im my eclipse IDE. I don't know how to open the index files in IDE for analyzing. I opened the index file directly but it shows some binary string.

Any idea how can I open the index files in the eclipse?


Solution

  • Once you have installed MAT into Eclipse, open the Memory Analysis perspective and then do File > Open Heap Dump > "/home/rajkumar/Documents/heap-dump-ads03/testdump.hprof" and that will open the heap dump using the existing index files (so no reparsing is needed). Then go to the toolbar 'Run Expert System Test' > 'Leak Suspects' to run the leak suspects report.

    As suv3ndu said, you can also run the report from the command line. You can also open an existing report zip from the GUI using 'Run Expert System Test' > 'Open Report'.