aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to read hprof in binary format? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to read hprof in binary format?" Watch "How to read hprof in binary format?" New topic
Author

How to read hprof in binary format?

Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
Hi Guys,

I am into developing a own Heap Analysis tool. For this, the input would be an (Heap Profiling) .hprof file in binary format.

But when I open this .hprof file, it contains the binary information.

Actually, I would like to know what Java APIs should I use to read and interpret (in a GUI to be created later) such binary files?

Thanks,
Guru
Carey Evans
Ranch Hand

Joined: May 27, 2008
Posts: 225

The HAT and VisualVM tools from Sun both parse HPROF files, and the source code is available for both of them. jhat can be found in tools.jar in Sun JDKs. If the license is acceptable to you, you could use either one of them in your project and save some work. See:
  • Old HAT website
  • Current jhat source
  • VisualVM home page
  •  
    Consider Paul's rocket mass heater.
     
    subject: How to read hprof in binary format?