Sundararajan's Weblog

  • Java
    June 19, 2006

Observability Top 10 in Mustang

Guest Author
You may have read Top 10 Things You Need to Know about Mustang (Java SE 6) beta-2. That top 10 covers the entire JDK. This is a Java Observability top 10:
  1. attach-on-demand API

    java.lang.instrument and JVM TI agents need not be loaded at the application start-up. Agents may be loaded "on demand".

  2. jconsole improvements

    More details: Mustang's jconsole - Mandy Chung

  3. java.util.concurrent lock information in stack traces

  4. Java heap dumps

    Java heap snapshot can be dumped into a binary format file (a.k.a hprof binary format). The format is specified http://heap-snapshot.dev.java.net
    There are many ways to dump the heap

    • Using -dump option with jmap against a live process
    • Running jmap against a core dump (on Solaris and Linux)
    • Running hprof profiler with -Xrunhprof:format=b option
    • Starting the JVM with -XX:+HeapDumpOnOutOfMemoryError option - with this option JVM dumps heap when OutOfMemoryError is thrown.
    • Programatically using HotSpotDiagnosticMXBean

    More Info:

  5. Heap dump analysis using jhat

    jhat - Java Heap Analysis Tool can be used to analyze the heapdumps produced by above means.

  6. DTrace Java support

  7. Turing on JVM flags dynamically

    Few JVM command line options can be turned on/off dynamically (from outside the process). Only a subset of flags - called manageable flags - can be turned on/off (or set) dynamically. Two ways:

    In addition, DTrace probes flag - ExtendedDTraceProbes flag - can also be turned on/off by jinfo

  8. New tools (with subset of options) on Windows

    • jstack (-l option and no options only, for live processes only). No mixed mode stack trace support.
    • jmap (-dump and -histo options only). i.e., heap dump and heap histogram options only.
    • jinfo (-flag and -flag +/- <flag-name> options only). i.e., only printing a JVM -XX flag value or turning on/off a JVM flag dynamically (of a live process).

  9. Better OutOfMemoryError!

    OutOfMemoryError looks a bit better! - better detail message and stack trace with OOM exception!

  10. Misc. command line tools improvements
    • jmap prints information on internalized Strings (count and total byte size) of internalized strings is printed with -permstat option
    • New -finalizerinfo option with jmap - prints summary information on objects waiting to be finalized.

Join the discussion

Comments ( 1 )
  • Danny Coward Monday, June 19, 2006
    As you know I'm a fan of top 10 lists, and I'm a fan of the Java SE Observaibility tools. How nice to see both at once.
    - Danny
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.