Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

analyse a HPROF memory dump file from command line programmatically

I was investigation with analyzing a HPROF file using Eclipse's Memory Analyser (MAT). The dominator tree, reports and the OQL interface look really useful. But all this has to be done manually from the MAT software.

Is there a commandline interface so I can programmatically parse the HPROF and automatically generate custom reports.

This would be useful to integrate this a test infrastructure to do a automatic memory analysis.

Btw, the heapsize is will be between 10-60MB.

like image 462
Abhishek Avatar asked Apr 12 '13 17:04

Abhishek


People also ask

How do I read a heap dump file?

If you have a heap dump file saved on your local system, you can open the file in Java VisualVM by choosing File > Load from the main menu. Java VisualVM can open heap dumps saved in the . hprof file format. When you open a saved heap dump, the heap dump opens as a tab in the main window.

What is a Hprof file?

HPROF is a dynamically-linked native library that uses JVM TI and writes out profiling information either to a file descriptor or to a socket in ascii or binary format. This information can be further processed by a profiler front-end tool or dumped to a file.


1 Answers

ParseHeapDump.sh does what you're looking for. As for the follow up question I'm not sure what format the index files are stored in.

like image 108
Deepak Bala Avatar answered Oct 04 '22 12:10

Deepak Bala