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.

Comments:

Post a Comment:
Comments are closed for this entry.
About

sundararajan

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Links

No bookmarks in folder

Blogroll

No bookmarks in folder

News

No bookmarks in folder