I know. JavaOne has already come and gone, and I promised, after my JavaOne submission snafu, to publish a Tutorial here by the end of JavaOne. Well, life happened, and here we are, a few weeks after JavaOne.
That said, here it is finally, the first draft of the JMC tutorial:
The tutorial instructions are in the JMC_Tutorial.pdf included in the root of the zip.
In this tutorial you can:
- Install JMC (either the stand alone version, the Eclipse version, or both)
- Do Java Flight Recordings
- Analyse Flight Recordings
- Watch a laser kill monsters
- Use experimental plug-ins such as the Java FX and WLS plug-ins for Flight Recorder, as well as JOverflow for doing memory dump analysis.
- Get to play with jcmd
The Tutorial has hours worth of material, so do the exercises that you find the most interesting first. Also, you may want to print out the tutorial and keep it beside your computer to minimize the switching back and forth between JMC, Eclipse and the pdf.
Hope you find this helpful!
(Please don’t hesitate to send suggestions or any bugs/typos found my way!)
Here are some other blog posts that will make for fine companions to the Tutorial:
I’ve heard about custom events for JFR from GlassFish, but I haven’t been able to find out what they are, how to record them , or how to view them in JMC if the viewing procedure is different than for built-in JFR events.
Do you know anything about these supposed GlassFish JFR events?
They are mentioned in:
If I’ve understood things correctly, this was something that the GlassFish team wanted to address in the commercial version of GlassFish. Then it was decided to not do a commercial version of GlassFish.
Is the source code for JMC available?
Can I write plugins for it? Is there an API that will give me access to all of the events that it and JFR have access to>?
Yep, but it is not yet supported, nor externally documented. The easiest way to create a JFR plug-in (if you only need to use the default components) is to use the built in (unsupported) GUI builder. If that is not enough, you can use the component extension points to build your own components. For information on the JFR parsers, look for my blog posts on the JFR parsers.
Nope, the source code is not available.
[…] A great step by step tutorial for Marcus Hirt covering what JMC and how to get up and running. http://hirt.se/blog/?p=611 […]
[…] JMC Tutorial […]
I downloaded the tutorial and ran the HotMethods example. I created the recording as well as viewed the sample recording that you provided in the HotMethods example. But,when I moved to events>Thread tab, I observed that the main method had a “total duration” of 0 sec. Per my understanding, the program has run and called the main method and the main method execution should have had a total duration > = recording duration. Not sure if My understanding is correct. Could you please help me understand why it shows 0.
Can we somehow show JDBC SQL call timing for JBoss in Mission Control?
We are using JMC for JBoss, and would like to see slow SQLs.
Sure! You can for example use this JFR SQL-wrapper:
[…] If you do not have a WLS recording, you can download and follow this tutorial to get one. To install the plug-in, simply go to Help | Install New Software… and select the WLS […]