Question

Are there any tools that allow offline analysis (including summary/sorting/sifting) of an .hprof file? Or can you run VisualVM, hat etc in batch mode?

I'm interested in something that can take an input .hprof file, crunch it and generate reports.

I assume you would need to pass in a bunch of options to configure the report, so if you know any helpful tips, please weigh in.

Preferably scriptable so I could run a bunch at once.

Was it helpful?

Solution

Eclipse Memory Analyzer does everything you need.

OTHER TIPS

You can use jhat to parse/navigate the memory dump of an .hprof file.

$ jhat heapdump.hprof
Reading from heapdump.hprof...

Started HTTP server on port 7000
Server is ready.

The tool comes with the JDK.

Can you use jmap -histo ? What sort of report are you looking to extract?

hard to beat yourkit java profiler. It costs money, but it is worth every penny.

JDK6 comes with jhat which parses and creates an html report.

http://docs.oracle.com/javase/6/docs/technotes/tools/share/jhat.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top