Observability highlights of Mustang
By sundararajan on Dec 06, 2005
- jhat - Java Heap Analysis Tool
This is a new command line tool [HAT +fixes+improvements + OQL (Object Query Language)]. Helps in analyzing OOM situations. More info is here:
- jmap -dump option
With this option, jmap dumps snapshot of heap in binary HPROF format. The resultant dump can be analyzed with jhat
- jstack -l option
- jstack in Windows
jstack displays Java stack traces for live processes (only).
- jmap -dump in Windows
dumps Java heap snapshot in a file for live processes (only). Window version supports just "jmap -dump:format=b,file=
<pid>" and not the other options. (jmap -histo is also being considered. So, this may change before Mustang FCS!)
- jmap -permstat prints info on intern Strings
Internalized Strings are stored in permanent generation. Sometimes too many interned Strings may result in OutOfMemoryError. jmap -permstat option now prints total number and size of internalized String instances.
- Better OutOfMemoryError reporting
New JVM option -XX:+HeapDumpOnOutOfMemoryError to force heap dump on OOM. More info here: OutOfMemoryError looks a bit better!
- Improved DTrace support
There are many built-in DTrace probes in Mustang. More info is here:
- jconsole improvements
There has been many improvements to jconsole. More info is here:
- JVM Attach API
API to load JVM agents dynamically into running applications (a.k.a "attach-on-demand"). More info is here: Using Mustang's Attach API
- Hprof includes primitive type data in heap dumps
Apart from bugfixes, to me this is very important change: hprof now includes primitive type instance fields and primitive array content in heap dumps.