The latest version of Java Mission Control was released a few moments ago, together with Oracle Java SE 8u40. It’s a minor release; most of the development is taking place in the upcoming major version of JMC, but there are nevertheless some interesting features and fixes in this release. I have selected a few of the highlights below.
Dynamic Enablement of Java Flight Recorder
If you forgot to enable flight recorder on the command line (in 8u40 and later), all is no longer lost – JFR can be enabled dynamically, after the fact that the JVM process has been started! If you try to connect to a JVM which has not enabled JFR, you will be presented with a dialog like this:
Clicking yes will dynamically enable the Flight Recorder and allow you to start recordings.
JMC Now Using Eclipse RCP 4.4
Up until now we have based the JMC RCP application on Eclipse RCP 3.8.2. The reason was due to a performance problem when running with Eclipse RCP 4.x. For JMC 5.5.0 we worked around this problem, and are now using Eclipse RCP 4.4. As a result, JMC will also feel much snappier when running inside of Eclipse, as a set of Eclipse plug-ins.
Upgrading to Eclipse 4.4 affects many different parts of the stand-alone JMC application. For a starter, plenty of bugs have been fixed in the platform over the past years. Fixes that JMC can now take advantage of. Also, various enhancements done to the platform are now available, such as themes:
It is supported to run JMC in the very latest version of Eclipse, and the speed should be comparable to running in Eclipse 3.8.2.
JMC Plug-ins Are Now Signed
JMC can be used as a set of plug-ins in Eclipse. This has the added benefit that you can jump to your source code from anywhere we display a class, or a method frame or similar. There is also an experimental update site from where you can install extra JMC content, for example the WebLogic Server plug-in, or the D-Trace plug-in. Previously all the JMC plug-ins were unsigned. Installing them into Eclipse required you to accept to install unsigned content into your Eclipse:
This is no longer the case.
JMC Friendlier to Users of Dynamic Languages
Looking at recordings from applications running in implementations of dynamic languages making heavy use of Lambda Forms will be much friendlier. Say, for example, a recording of a Java Script application running on Nashorn. Just like the JVM by default hides @hidden annotated Lambda Form methods, so will JMC. If you still want to see them in all their glory, the setting can be toggled in the preferences.
Here is a picture of the same recording opened twice – to the left opened with @hidden annotated methods hidden, and to the right with @hidden annotated methods visible:
And here is what a stack trace can look like with them visible:
Suffice it to say, you will usually want to leave them hidden… 😉
Bugfixes
- Performance workarounds for certain CTabFolder related Eclipse bugs, which allows us to run faster in Eclipse 4.x
- Numerous bugs fixed from upgrading to a newer version of the platform
- The JMX Console no longer assumes it is connected to the platform MBean server – any MBean server should be okay, and functionality degraded gracefully
- JMC no longer assumes that projects are physically located in the workspace when running in Eclipse
- When jumping to source from a stack trace in the JFR UI, you will end up on the correct line number (previously you always ended up in the method declaration, even when aggregating per line number)
- You can now use the –vmargs flag to append JVM arguments when launching JMC. Previously –vmargs would replace all JVM arguments
Summary
- Yay, JMC 5.5.0!
- Yay, Java SE 8u40!
[…] bei http://hirt.se/blog/?p=646. Bestes Feature, keine Schalter mehr beim Start der JVM, das kommt […]
Looking forward to trying out 5.5!
We’re having a great time with the older versions, but do see an issue where almost all stacks in the “Code -> Call Tree” view are rooted at a node called ~ UNCLASSIFIABLE ~.().
Is there any good place to discuss things like this about JMC? This blog seems to be the only up to date source of info and discussion on it.
The best place for discussions is the Oracle Mission Control forum. It can be reached both from within Mission Control (Help -> Forum), and from the oracle.com/missioncontrol homepage.
That said, try this:
http://hirt.se/blog/?p=609
With regard to Travis Downs’ comment about ~ UNCLASSIFIABLE ~.() call trees, we had this problem because the default stack depth limit (64) wasn’t enough. It would be good to make this default, and the option used to change it (mentioned in your blog post here: http://hirt.se/blog/?p=364 ) clearly visible in the documentation.
Hello,
seems the Eclipse intergration has a problem in Eclipse 4.5 Mars … for “Run As” – “JUnit Test with Flight Recorder” in the error log lands
java.lang.NoSuchMethodError: com.jrockit.mc.ide.launch.model.JFRLaunchModel.getDefaultRecordingFileName(Ljava/lang/String;)Lcom/jrockit/mc/core/MCFile;
at com.jrockit.mc.ide.launch.model.JFRLaunchModel.(JFRLaunchModel.java:71)
at com.jrockit.mc.ide.launch.JFRLaunchShortcutHelper.updateLaunchConfigurationWithJFRSettings(JFRLaunchShortcutHelper.java:28)
at com.jrockit.mc.ide.launch.JFRJUnitLaunchShortcut.createLaunchConfiguration(JFRJUnitLaunchShortcut.java:23)
at org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut.performLaunch(JUnitLaunchShortcut.java:222)
Anyway, the JMC plugin can be triggered in other ways – so this is not a show stopper! 🙂
Merten
Thanks for letting me know! I’ve opened a bug to look into this!
/M
Hi Marcus,
Recently had a chance to configure JMC for one of our feature. Really stunned by the features the tool offers after the convergence. We have been using the leading APM tools available in the market. But when compared to the features offered particularly on memory profiling JMC stands out.Thanks to you for collating all the stuff related to JMC. Without your blogs i felt its difficult to browse all the features.Pursuant to the features. I would like to know how i can integrate the DTrace Plugin and where i can donwload the plugin as i don see any link to keep going. Thanks in advance
Sattish.
Hi Marcus,
Sorry for the request. I was able to grab the URL for installing DTrace Plugin and it got installed without issues.
Thanks
Sattish.
Hi Marcus,
I am attempting to install Coherence & Weblogic plugins for JMC 5.5.0 (Eclipse version). I can see that all features have a package starting with com.jrock.mc…My applications (and Weblogic) are running on HotSpot. I want to make sure that these plugins will work.
Any suggestions where to find some documentation on how to use these plugins much appreciated.
Thanks !
Ovidiu
Don’t let the com.jrockit.mc package domain scare you off – JMC 5.5 is all for HotSpot. As a matter of fact, in JMC 6.0.0, the next major version of JMC, we will move to com.oracle.jmc. For JMC 5.5.0 the plug-ins are experimental. That is, they are undocumented and delivered as is without support. For JMC 6.0.0, the Coherence and Weblogic plug-ins will be supported.
Hi
I’m trying to parse JFR into JAVA using parsers. (http://hirt.se/blog/?p=446) what is the latest JMC version that supports Flight recorder parser?
The latest version of JMC is 5.5.