Quick intro
JDK mision control 8
Roadmap
"Let's introduce the JMC!"
Introduction to JDK Mission Control
*Is a Java tools suite
- =>Focus is on production profiling and diagnostics
- =>Also contains other tools, such as a heap waste analysis tools
*Was once JRockit -> Java Mission Control (Commercial)
*Became JDK MIssion Control when Open Sourced by Oracle
"Let's present the current existing versions!"
JDK Mission control versions
*Open sourced version was 7.0.0
*Current source release is 7.0.1
*Upcoming release (any day now!) is 8.0.0
*Binary releases from multiple vendors, such as Adopt OpenJDK, Azul, Bell-Soft, Oracle and Red Hat (included Fedora)
"Let's detail what compose the JMC!"
JMC is many things
*An application
- =>e.g. for visualizing JFR recordings and/or controlling the flight recorder
*An application framework
- =>e.g. a good place to add applications that deals with JVMs
*A library
- =>e.g. for parsing and processing flight recordings of any version (including Oracle JDK 7+, and Open JDK 8+)
"Let's discuss the features of JMC!"
JMC Feature: JMX Console
*Great for monitoring the JVM continuously
*Great for browsing MBeans / trying out MBean APIs
*Great for invoking Diagnostic Commands remotely (jmc commands)
JMC Feature: JOverflow
*Heap waste analysis
*Now included by default
*Ported to SWT in JMC 8
*Will demo as part of the JMC 8 demos
JMC Feature: JFR
*Control flight recordings
*Create and edit flight recorder templates (.jfc files)
*Visualize recordings
*Analyze recordings
JMC Feature: Core librairies
*Mostly used to parse JFR data
- =>Supports parsing recordings all the way from Oracle JDK 7 and up to the latest OpenJDK version
- =>Presents a java in-memory model
- =>Declarative API allowing filtering and aggregation
*Will finally be published on Maven Central for JMC 8
Using the Core librairies
Group: org.openjdk.jmc Artifacts: Common, flightrecorder, flightrecorder.rules, flightrecorder.rules.jdk Version: 7.0.1-SNAPSHOT <dependency> <groupId>org.openjdk.jmc</groupId> <artifactId>common</artifactId> <version>${jmc.version}</version> </dependency> <dependency> <groupId>org.openjdk.jmc</groupId> <artifactId>flightrecorder</artifactId> <version>${jmc.version}</version> </dependency> <dependency> <groupId>org.openjdk.jmc</groupId> <artifactId>flightrecorder.rules</artifactId> <version>${jmc.version}</version> </dependency> <dependency> <groupId>org.openjdk.jmc</groupId> <artifactId>flightrecorder.rules.jdk</artifactId> <version>${jmc.version}</version> </dependency>
JMC 8 - Flight Recorder
*Flight Recorder
- =>Improved Flame Graph
- =>Graph View (EA)
- =>Rules 2.0
- =>Core API updates->JDK8
- =>New Core Module: JFR Writer
JMC 8 - Agent
*BCI Agent for declaratively adding JFR events
*JMX API for controlling instrumentation
*Capture parameter val
*Capture fields
*Converter support
*Hardening
<event id="demo.jfr.test"> <label>JFR Hello World</label> <description>Defined in the xml file and added by the agent. Records the parameter.</description> <path>demo</path> <stacktrace>true</stracktrace> <class>org.openjdk.jmc.agent.test.IntrumentMe</class> <method> <name>printInstanceHelloWorldJFR</name> <description>(Lorg/openjdk/jmc/bciagent/test/Gurka;)}V</descriptor> <!-- Note that this will only work if we allow toString (or add a converter)--> <parameters> <parameter index="0"> <name>Gurka Attribute</name> <description>The one and only Gurk-parameter</description> <contenttype>None</contenttype> </parameter> </parameters> </method> </event>
JMC 8 - Agent - Converters
<event id="demo.jfr.test"> <label>JFR Hello World</label> <description>Defined in the xml file and added by the agent. Records the parameter.</description> <path>demo</path> <stacktrace>true</stracktrace> <class>org.openjdk.jmc.agent.test.IntrumentMe</class> <method> <name>printInstanceHelloWorldJFR</name> <description>(Lorg/openjdk/jmc/bciagent/test/Gurka;)}V</descriptor> <!-- Note that this will only work if we allow toString (or add a converter)--> <parameters> <parameter index="0"> <name>Number as Double</name> <description>The converted Gurk-[arameter</description> <contenttype>None</contenttype> <converter> Converter.convertCustomDouble(Lorg/openjdk/jmc/agent/test/Gurka;)D </converter> </parameter> </parameters> </method> <location>WRAP</location> </event>
JMC - JOverflow
*SWT Converter
*Hierarchical Tree Map
"Let's talk of what's coming next!"
Beyond JMC 8 - Short term
*Support for the new Allocation Event
*Intelligent Graph Pruning for the Graph Visualizer
*Support the Graph View on Windows
*Attribute Selector for the Flame Graph and Graph Views, potentially also the Stacktrace View
Beyond JMC 8 - Mid Term
*JMC Agent Integration into JMC
- =>Control the agent from JMC
- =>Define probes
*JMC Agent Support for Target Emission Rates (Subsampling)
*Hierarchical Tree Map for Aggregated Stacktraces
*Butterfly / Sandwich View
*Constant Pool Explorer
Beyond JMC 8 - Long Term
*Provide ready to use solutions for visualizing JFR data with popular visualization frameworks
*Server side triggers
"Finally, let's list some relevant resources!"
Get Started
*Tutorial:
(Feel free to fork and do pull requests for the Tutorial!! :))
*JShell for JMC-core (jmc-jshell):
Links
*GitHub Repo:
*Blog:
*Continuous Profiling Blog:
Contribute
*Github!!! 11!!:
*Skara blog:
*Mailinglist: