10

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?

Marian
  • 2,617
  • 1
  • 16
  • 13

2 Answers2

8

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

user2982622
  • 103
  • 1
  • 6
3

You could try the SAP Memory Analyzer.

Adamski
  • 54,009
  • 15
  • 113
  • 152
  • Adamski, thanks for the link. I browsed the source and in the AbstractParser class I found a reference to https://heap-snapshot.dev.java.net/files/documents/4282/31543/hprof-binary-format.html So, I guess for the file format reference, that's the answer. – Marian Aug 25 '09 at 16:43
  • 1
    And now... 'The Answer' has expired... dead link. – Rondo Jun 29 '12 at 03:12
  • 1
    Here's an [updated link](https://java.net/downloads/heap-snapshot/hprof-binary-format.html). – BeeOnRope Jul 09 '14 at 06:43