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.
We will first start the Memory Analyzer Tool and open the heap dump file. In Eclipse MAT, two types of object sizes are reported: Shallow heap size: The shallow heap of an object is its size in the memory. Retained heap size: Retained heap is the amount of memory that will be freed when an object is garbage collected.
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.
Eclipse Memory Analyzer does everything you need.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With