This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
  •  
    Don't get me started about those stupid light bulbs.
     
    subject: How to read hprof in binary format?
     
    Similar Threads
    How to take memory heap dump snapshot in java
    How to store image, audio, video & text files POSTed to JSP page?
    Heap Analysis library / API available?
    no hprof ascii data
    OutOfMemoryError in a servlet