X

Sundararajan's Weblog

  • Java
    October 6, 2005

Does jhat work for heap dumps produced from earlier JDKs?

Guest Author

Short answer: Yes. Mustang's jhat works against heap dumps produced from earlier JDKs as well. It just works -- because it uses the same HPROF binary file format as used by hprof profiler and jmap tool. jmap tool can dump from live Java processes and Java core dumps. This feature has been backported to 1.4.2_09 (solaris only) and 5.0 update 5 (solaris and linux only) releases. hprof produces heap dump with allocation site trace information in the same format -- you need to use format=b option with hprof. As you'd probably know, hprof prodifier has been existing in JDK for quite some time.

And yes, HPROF binary file format is platform independent. Therefore jhat on any platform can parse and view heap dumps produced from any platform

Join the discussion

Comments ( 2 )
  • Philippe Lantin Friday, October 14, 2005
    jhat can be extremely useful for diagnosing OutOfMemoryError issues in application servers.
    I've used it with weblogic 8.1 to confirm an OOM bug on a 1Gb heap. Having Solaris 10 running on a 24Gb AMD64 v40z with jhat in 64-bit helps to deal with large heap dumps.
  • guest Wednesday, February 8, 2006
    I can't seem to get JHat (Windows, Mustang 70) to read the heap.bin files generated by jmap (Linux, 1.5.0_05). It complains about the dreaded magic number.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.