Java Mission Control (Finally) Released!

If you’ve had the time to download the latest Java 7 JDK update (7u40), you may have noticed that there is a new addition to the tools in the bin folder: Java Mission Control!

Java Mission Control is a production time tools suite that has its roots in the JRockit JVM tooling. This is the Mission Control team’s first public release in a couple of years, so we’re obviously quite excited! That said, the 5.2.0 version number is really a bit misleading – for most purposes and intent this is really a 1.0.0 release. Please have some patience as we bring Mission Control fully to par with what JRockit offered. Meanwhile I hope you find it as useful as I do!

I will be talking more about Java Mission Control in blogs later this week, but in this one I just thought I’d just do my own version of the release notes. Here goes:


General


Now part of the Hotspot JDK!
This is the first release of Java Mission Control that is bundled with the Hotspot JDK! The convergence project between JRockit and Hotspot has reached critical mass. With the 7u40 release of the Hotspot JDK the information available from HotSpot is equivalent to that of JRockit. This doesn’t necessarily mean that all events are exactly the same – the JRockit and HotSpot JVM implementations are quite different. It does mean, however, that the set of events available from HotSpot contains more than enough to be quite useful.

jdk

New JVM Browser
The JVM Browser now have sub-nodes for server side services available. The sub-nodes can show the state of the service. For instance, the Flight Recorder service will, if expanded, show what recordings are running on the server, if any. It also provides improved drag and drop behaviour, as the default action for each service will be invoked when the service is dragged to the editor area (or double clicked). The new JVM Browser can be viewed in two different modes – as a flat list, and as a tree. The flat list is useful when you are only working with local JVMs. The tree view makes it easier to keep track of JVMs discovered from multiple different sources, such as JDP-discovered JVMs, custom created remote connections, and local JVMs.

browser

Eclipse 3.8/4.2 support
Mission Control can now be installed in the Eclipse 3.8.2/4.2.2 IDE. There is also an update site for experimental plug-ins.

eclipse

Note: Unfortunately JMC 5.2.0 will not install in Eclipse 4.3.x or later (fixed in the upcoming 5.3.0 release of Mission Control). Also, note that the performance issues in the 4.x branch of Eclipse makes JMC quite a lot slower to work with in Eclipse 4.x compared to Eclipse 3.8. With some luck, this will improve in the upcoming 4.3.2 version of Eclipse. The stand alone version of JMC is built on 3.8.2 and is not affected.

Minor bug fixes and improvements
There are hundreds of minor fixes and improvements in this release. For example: Configurable encryption for the secure password store and support for the Hotspot version of JDP (Java Discovery Protocol, used to detect running JMX agents). There is also an action available now to start the external management agent on a locally running JVM.

startremote


Management Console


Improved MBean Browser
It is now possible to edit values for settable attributes directly in the attribute tree. Synthetic attributes (virtual attributes that are contributed through an extension point and calculated on the client side, possibly using server side values) now have a greyish background in the Name column. Column visibility can now be changed by right-clicking on a column header. The results of invoking multiple consecutive operations are now shown in the results section. Notifications in the notifications tab can now be arbitrarily expanded, just like attributes in the attributes tree. It is also possible to subscribe to multiple notifications at the same time.

browser

Coherence plug-in
The Coherence plug-in has seen numerous bug-fixes and resource optimizations. To install it into the stand alone version of Mission Control, go to Help | Install plug-ins… on the menu. To install it into Eclipse, first install the Eclipse plug-in version of Mission Control, then install it from the Experimental update-site.


Java Flight Recorder (JFR)


Event Convergence with JRockit
Hotspot has now reached event convergence with JRockit. That means that most useful information that was provided from JRockit is now also available from Hotspot. That said, JRockit and Hotspot are quite different JVMs; the information will in some cases be a bit different. That said, you can still profile most application with less than 2% overhead. Usually much less. Which, considering the information you get, is next to nothing.

jfr

Method profiling
There are now method profiling events! With the method profiling events you can find out where your application is spending the most time executing your Java code. This is, for instance, useful to optimize the application where the optimizations actually have an impact.

methodprofiling

Allocation profiling
The allocation profiling tab has been improved. You can see per TLAB allocation with traces, and object being allocated directly in old space.

allocationprofiling

New and improved tabs
All tabs in the Flight Recorder have gotten a major overhaul. Some worth mentioning are, for example, the File I/O, Socket I/O, Compiler, Exception and GC tabs. Details and screenshots for all these changes would make for a very long New and Noteworthy – instead I encourage you to try them out!

newtabs

Latency analysis
Sometimes you may wonder why the CPU never saturates, no matter how much load you generate for your app. Everything just starts going slower. The Flight Recorder records your thread stalls so that you can find out why. In this version you can look at individual monitor instances.

lockinstances

Thread graph
The thread graph is useful for getting an overview of what threads are running and what they are doing. Minor fixes in this version include better time stamps on the time line.

threadgraph

New Templates
Previously you needed to know exactly what event types to configure when you wanted to change the recording settings. Now there is instead an easy to use configuration step in the templates where you will find the most useful settings. For instance, you can change how often method samples to record (Low, Medium, High), instead of needing to know exactly what event types to configure. You can still, of course, do the per Event Type fiddling if you would like to. Also, the client and server side template formats are the same, so you can export your templates from the client, and use them on the server.

newtemplates

Template Manager
There is also a new template manager to go with the new templates!

templatemanager


Experimental Plug-ins


JOverflow – Heap dump analysis for memory waste
This plug-in allows Mission Control to do heap dump analysis, primarily to look for wasted heap space. There are several different anti-patterns JOverflow will look for, such as duplicate strings, underutilized collections etc. This plug-in also adds an action (for local connections) that will perform a heap dump and then visualize the heap dump with JOverflow.

joverflow

DTrace plug-in improvements
There has been a lot of bug fixes and improvements to the DTrace plug-in. The DTrace plug-in for Mission Control is available from the update site. To install it into the stand alone version of Mission Control, go to Help | Install New Software… on the menu. To install it into Eclipse, first install the Eclipse plug-in version of Mission Control, then install it from the Experimental update-site. The improvements to the plug-in include: improved error handling and error reporting, improved documentation, faster wizard start-up and miscellaneous bug-fixes. I’ve written a blog on the experimental D-Trace plug-in that contains some more information.

dtrace


Memleak


Not available (yet)!
If you are a JRockit Mission Control user, you will probably go look for the on-line heap analyser called Memleak. Well, the convergence between JRockit and Hotspot is not quite complete yet. We do however provide a useful heap dump analysis tool called JOverflow. More information above.

memleak


Further reading and useful links

The Mission Control home page: 
http://oracle.com/missioncontrol

Mission Control Base update site for Eclipse:
http://download.oracle.com/technology/products/missioncontrol/updatesites/base/5.2.0/eclipse/

Mission Control Experimental update site (Mission Control plug-ins):
http://download.oracle.com/technology/products/missioncontrol/updatesites/experimental/5.2.0/eclipse/

The Mission Control Facebook Community Page (not kidding):
http://www.facebook.com/pages/Java-Mission-Control/275169442493206

Mission Control on Twitter:
@javamissionctrl

Me on Twitter:
@hirt

19 Responses to "Java Mission Control (Finally) Released!"

  1. […] that Mission Control has finally been released, it will be way less frustrating to attend […]

  2. […] Blogs: Java Mission Control Finally Released My JavaOne 2013 […]

  3. […] Blogs: Java Mission Control Finally Released Creating Flight Recordings My JavaOne 2013 Sessions Low Overhead Method Profiling with Mission […]

  4. Jesse says:

    I can’t seem to get JDP to work, is there anything I have to do to my JVMs to get them to be discoverable in JMC?

  5. Marcus says:

    Yep. Will add blog entry on that shortly! 🙂

  6. Marcus says:

    Here you go, quick post on JDP:
    http://hirt.se/blog/?p=388

    Hope this helps!

  7. phraktle says:

    JMC is an excellent tool, nice to see it being available in the latest JDK!

    One major limitation of the profiler is that it does not track time spent in native code at all. Do you have any plans to improve this? Without this, the profile information can be very misleading…

  8. Marcus says:

    We have some ideas. 🙂

  9. Jochen says:

    I just installed 7u40 on Mac OS X. Seems like JMC is not included. Searching through /System/Library/Frameworks/JavaVM.framework reveals no JMC-executable. Am I missing something?

  10. Marcus says:

    Please check the FAQ:
    https://forums.oracle.com/thread/2579717

    Hope this helps!

    Kind regards,
    Marcus

  11. PhilC says:

    If you installed it on Mac OSX, look in: /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/bin

    and you will find jmc binary. In general, on OSX, you can write your scripts to set JAVA_HOME like so:

    export JAVA_HOME=”$(/usr/libexec/java_home)”

    and set which Java version to default to using Java Preferences.app. Hope this helps.

  12. stoffipop says:

    JBoss uses it’s own JMX protocol, so there is some additional JAR files that are needed to be able to connect. How is it possible to add these JAR files?

    There are .bat/.sh files in the JBoss distribution for launching jconsole etc with the needed JAR files. I’m looking for a similar solution for JMC

  13. Marcus says:

    It should be possible to do exactly the same as you would for JConsole. Check out the jmc.ini next to the jmc launcher, and just add your parameters to the vmargs section.

  14. […] Java Mission Control (Finally) Released! | Marcus Hirt Looks like some pretty nice stuff for ops. (categories: jvm ops operations devops java ) […]

  15. Marc Logemann says:

    Why is “File Read” and “File Write” not existant in Template Editor in JMC on Mac OS X? It should be under “Advanced -> Java Application” but it isnt. This feature is one of my favourites and i cant enable it….

    Marc

  16. Marcus says:

    Hi Marc,

    Is this JDK 8? If so, I/O events were temporarily removed in JDK 8. They will be back in 8u20.

    Kind regards,
    Marcus

Leave a Reply

Your email address will not be published. Required fields are marked *