Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to read hprof in binary format?

 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 225
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  •  
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic