« October 2006 »
SunMonTueWedThuFriSat
1
2
5
8
10
13
14
15
17
19
20
21
23
25
27
29
    
       
Today
XML

Blog::Navigation

GetJava Download Button
Get the Source
Personal Blog

Blog::Referers

Today's Page Hits: 835

Powered by Roller Weblogger.
« Previous day (Oct 2, 2006) | Main | Next day (Oct 4, 2006) »
20061004 Wednesday October 04, 2006

jhat swing interface

Sandip Chitale has created Swing interface to query Java heap dumps.

Java binary heap dumps can be created using

  1. jmap
    
      jmap -dump:format=b,file=heap.bin <pid-of-java-process>
    
    
  2. hprof profiler
  3. From jconsole, access hotspot diagnostic MBean.

Recall that jhat (Java Heap Analysis Tool) supports webbrowser based interface. jhat parses a heap binary file and starts a webserver. Then, we'd use a webbrowser to query the heap. With this new Swing based tool for heap dumps, it is easier to work with heap dumps. I used the following commands to create and view a heap dump using jhat swing interface:


D:\jdk1.6.0\demo\jfc\Java2D>jmap -dump:format=b,file=heap.bin 1204
Dumping heap to D:\jdk1.6.0\demo\jfc\Java2D\heap.bin ...
Heap dump file created

D:\jdk1.6.0\demo\jfc\Java2D>java -Xmx256m -classpath D:\jdk1.6.0\lib\tools.jar;S
wingJHAT.jar  org.netbeans.profiling.tools.SwingJHAT heap.bin
Dump file created Wed Oct 04 19:16:13 GMT+05:30 2006
Resolving 54815 objects...
Chasing references, expect 10 dots..........
Eliminating duplicate references..........

Note: classes in tools.jar may be changed without notice. Not all classes in tools.jar are part of platform interface. Such non-public classes may be renamed or removed in next release!

If you have ideas on improving heap dumps, like different/better file format and/or what needs to be included in heap dumps and so on, then please join and contribute to the heap snapshot project.



( Oct 04 2006, 07:31:25 PM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

Copyright (C) 2005, A. Sundararajan's Weblog