Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hprof file format

Tags:

java

hprof

Does anyone know a reference for the .hprof (binary heap dumps) file format?

Does anyone know libraries that handle .hprof files? I know that hat does that and also VisualVM through a NetBeans plugin. But are there others?

like image 464
Marian Avatar asked Aug 25 '09 16:08

Marian


People also ask

What is an Hprof file?

hprof files are heap dump of the memory of java-based processes. Huge hprof files most commonly indicate out of memory issues about the related processes. These hprof files can be configured at startup to track and monitor memory performance issues.

How do I open a Hprof file?

Opening 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.

Why Hprof files are created?

An Hprof file can be created as a heap dump of the memory of a Java™ process. This is typically created when there is an Out of Memory error occurs on the system.

Is it safe to delete Hprof file?

HPROF is a binary heap dump format originally supported by J2SE. You can delete it.


2 Answers

Hi as long as there is no more hprof agent with it doc we can only use code as a format specification.

So here is few links.

first of all here is old doc for hprof agent, it could be redundant but stil http://hg.openjdk.java.net/jdk6/jdk6/jdk/raw-file/tip/src/share/demo/jvmti/hprof/manual.html you can find hprof specification section in it.

Next, here is heap dumper and hprof spec from jvm code link to openjdk repo

https://hg.openjdk.java.net/jdk/jdk/file/9a73a4e4011f/src/hotspot/share/services/heapDumper.cpp

link to github mirror

https://github.com/unofficial-openjdk/openjdk/blob/60b7a8f8661234c389e247942a0012da30146a57/src/hotspot/share/services/heapDumper.cpp#L58

like image 174
user2982622 Avatar answered Oct 04 '22 18:10

user2982622


You could try the SAP Memory Analyzer.

like image 32
Adamski Avatar answered Oct 04 '22 19:10

Adamski