Yay! Today a new version of Java Mission Control was released together with 8u20! This blog entry will provide a quick summary of some of the new features and fixes in JMC 5.4.0. Since I didn’t write anything when the 5.3.0 was released, I will cover a few features that were already included in 5.3.0. Both the 5.3.0 and 5.4.0 are minor, incremental releases, so there are no radical changes. Those will happen in JMC 6.0, which is where most of the development effort has been taking place for a while now. 😉
New Plug-ins!
Two new plug-ins were introduced with JMC 5.4.0: the Java FX plug-in and the Eclipse IDE launcher plug-in. The Java FX plug-in can be installed in both the stand alone and Eclipse plug-in version of JMC, whilst the launcher plug-in is only available for the Eclipse plug-in version of JMC.
The Java FX plug-in
In 8u20 Java FX integrates with the Java Flight Recorder, producing events about Java FX pulses and input events. With JMC 5.4.0 there is an experimental plug-in that can be downloaded into JMC which provides custom visualization for these events.
Using the plug-in, you can quickly look at the pulses and see how much time was spend in the different phases.
And for completeness, above is a picture of the view for the input events. If you’d like, you can use the built in GUI editor to spice it up further:
The Launcher Integration plug-in
The launcher integration plug-in makes it easier to run your applications from within Eclipse with the Java Flight Recorder enabled. A new alternative is added to the “Run As” menu when the plug-in is installed – Java Application with Flight Recorder.
A new launcher alternative will be available, “Java Application With Flight Recorder”, which adds an extra tab in the Eclipse Run Configuration dialog to help you launch your Java application with a flight recording running.
At the bottom of the Flight Recorder launcher tab you will see the JFR related arguments that will be added to the VM arguments to make it all happen.
Miscellaneous Enhancements
Aside from the two plug-ins, there are quite a few enhancement to the base JMC product. I’ve selected a few user facing ones. (The pictures can be clicked for higher resolution versions.)
- You can now select how to aggregate method frames in stack traces, either by method (default), line number or by byte code index (or any combination). When you choose line number, you will now see the line numbers in the stack trace view. For BCI the recording must have been created with 8u20 or later.
- The dump JFR trigger action no longer requires a default recording to operate upon. Any ongoing recording will do.
- Using ctrl+mouse wheel in the thread graph in the Flight Recorder UI to zoom, will now zoom towards the mouse pointer.
- JMC will now choose the stronger AES/SHA-2 cipher over triple DES/SHA-1, if available, for PBE.
- In 5.3.0 a new content type system was introduced. It is currently only used in the JMX console, but will be used all over Mission Control in 6.0.0 and later. The content type system associates a value with its physical quantity and unit of measurement, making it possible for JMC to render the value better and for the user to input values in a much more convenient way. For example, in the Memory Pool MBeans it is possible to set a usage threshold. Previously a (usually) very long number stating the number of bytes would have to be entered. Now that value can be entered with whatever unit you please.
Attributes that have no physical quantity and unit specified can have one set by the user.
The best would of course be if there was a standardized way of adding this metadata to the MBean attributes themselves, instead of (only) to the JMC JMX console. We hope to include such metadata in the JMX spec in the future. - Also in 5.3.0, the console tab groups and tabs were redistributed and normalized, so that no tab groups would need to be visible by default.
Installing plug-ins may make the tab groups area re-appear. - In 5.3.0 there was a new context action introduced for copying stack traces to the clipboard (JFR).
- There was also a new user interface introduced showing the VM flags (JFR).
- Attributes with the same update interval and on the same MBean are now fetched at the same time to minimize roundtrips.
- In the memory tab, there is now the possibility to take heap histograms. Note that you need to be connected to a JDK 8 JVM for this to show up.
Click the Update Heap Histogram button to take a new snapshot. The difference between the two last ones will be calculated and shown in the Delta column.
Bugfixes
We’ve also fixed a bunch of bugs! I’ve selected a few:
- The dropins folder now works as expected. To install a plug-in, it can simply be dropped into the JDK_HOME/lib/missioncontrol/dropins folder.
- Installing experimental plug-ins in a shared installation now works. Previously installing plug-ins in a shared installation could fail silently.
- JMC and JFR did not agree on how to specify some time units, making it impossible to use recording templates containing time values specified in minutes interchangeably as server side and client side templates. Fixed.
- JMC no longer hangs when starting up on Mac (due to an SWT/Swing interop problem on Mac OS X – we have a workaround).
Summary
- There is a new version of Java Mission Control available now – JMC 5.4.0.
- It is shipped with Oracle JDK 8u20.
- It is also available as a set of Eclipse plug-ins.
- Even though most of the development effort is put into the next major version of JMC, there are lots of useful new features and bug fixes in these incremental releases.
Further reading and useful links
Related Blogs:
Creating Flight Recordings
Low Overhead Method Profiling with Mission Control
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.4.0/eclipse/
Mission Control Experimental update site (Mission Control plug-ins):
http://download.oracle.com/technology/products/missioncontrol/updatesites/experimental/5.4.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
Hi
I’ve been very happy with the news of jmc being bundled into jdk 7u40 on wards. While the inclusion is great, I find the licensing of the product a bit grey. Everything I read about the new JMC says its free to use in development but requires a license for production. But looking at the BCL I’m not entirely sure whats free and whats not (probably because I’m not good at legal text)
As the jmc has two main components 1. JMX console (jconsole on steroids) 2. Flight recorder, does both need production license or is it only the Flight recorder (as that’s the only one that needs special vm parameters). Does the ‘production license’ apply to web-apps as well? And if production license need to be bought where and how much do they cost.
The product itself is great IMO, but once you try it out you get to think about licensing and cost if you’re to use these great features in production. But that part of the product seems a bit light in detail.
Sorry its not a technical comment.
Hi! For licensing information, see:
http://www.oracle.com/technetwork/java/javase/terms/products/index.html
We are working on updating the Binary Code License as well as the licensing text to make it easier to understand. Also, we want to make sure that commercial/free is as simple as “if you enable the commercial features flag, it is commercial”. We aren’t quite there yet, unfortunately.
As per the Binary Code License, all usage for evaluation and development (on your laptop/workstation) is always royalty free (even if/when you use the commercial features flag). As a developer, you can use JMC and JFR to build, debug and optimize your application without owing Oracle a cent. We only charge for production use – so if you build a web app and deploy it to a server and the JVM that runs it has the commercial features flag enabled then you need a Java SE Advanced license for the server. The desktop that runs the JMC GUI never needs a license.
Henrik Stahl
VP Product Management, Java, Oracle
I tried to install the IDE integration but Eclipse 4.4. tells me that Flight Recorder Launch Configuration Tab cannot be installed:
Cannot complete the install because one or more required items could not be found.
Software being installed: Flight Recorder Launch Configuration Tab 0.0.3 (com.jrockit.mc.feature.ide.launch.feature.group 0.0.3)
Missing requirement: Flight Recorder Launch Configuration Tab 0.0.3 (com.jrockit.mc.feature.ide.launch.feature.group 0.0.3) requires ‘com.jrockit.mc.feature.flightrecorder.feature.group 0.0.0’ but it could not be found
Hi Marcus,
we are using JMC5.2. We have 4 applications running in test environment(on single server), we wanted to profile a single application. We have exposed server as a JMX bean and we have invoked our application from browser, we have even recorded using Flight Recorder to see how our application is behaving, surprisingly we were not able to see any of our application classes/methods listed in hot methods or anywhere in JMC. we have seen expanding the subtrees also, but could not find any of our application specific classes.
Please let me know how to profile a single application on server using JMC.
Thanks in Advance
Suresh.M
[…] Java Mission Control 5.4.0 release […]
[…] revision introduces several features starting with string deduplication, a new management console, JMC updates, runtime heap resizing and much more. For a full list of features in JDK 8u20, head over to the […]