JMC Tutorial

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!)


Other Resources

Here are some other blog posts that will make for fine companions to the Tutorial:

12 Responses to "JMC Tutorial"

  1. Ross says:

    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:

  2. Marcus says:

    Hi Ross,

    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.

    Kind regards,

  3. bill roberts says:

    Is the source code for JMC available?

  4. bill roberts says:

    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>?

  5. Marcus says:

    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.

  6. Marcus says:

    Nope, the source code is not available.

  7. […] A great step by step tutorial for Marcus Hirt covering what JMC and how to get up and running. […]

  8. […] JMC Tutorial […]

  9. manoj says:

    Hi Marcus,
    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.

  10. Arabinda says:

    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.

  11. Marcus says:

    Sure! You can for example use this JFR SQL-wrapper:

  12. […] 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 […]

Leave a Reply

Your email address will not be published.