JDK Flight Recorder introduced in OpenJDK 11.
This feature is low overhead of profiling and be able to used on production environment.
High Performance recording engine is embedded to Hotspot VM.
9. Flight Recording Engine
Java API
Events
JavaVM
/ OS Events
Repository
(disk storage)
Global
Buffer
-a
-b
Global
Buffer
Global
Buffer
Global
Buffer
Global
Buffer
Global
Buffer
Global
Buffer
Global
Buffer
When full, is copied into
Thread
Buffer
Event
Event
Event
Event
When full,
is copied into
JFR File
When triggered, is dumped into
12. 0 1 400 4 154 000 1 800
JFR disabled JFR enabled,
stackdepth=1
log4j OFF log4j INFO j.u.logging OFF j.u.logging INFO Redirected
System.out
NANOS/OPERATION
JMC, 8 THREADS
Logging Benchmark
120 000 00043 000 000
Jfokus Developer Conference 2018 Mission Possible -Near Zero overhead profiling
java.util.logging System.outJDK Flight Recorder Apache Log4j
ON
OFF
ON
OFF
ON
OFF
38. Java VM
Recording
Started on demand Dumped on end
JFR File
(dumped into JFR File)
duration
jcmd <pid> JFR.start settings=profile,duration=60s,name=Sample,
filename=c:¥myRecording.jfr
jcmd
64. JEP 328 : Flight Recorder
https://openjdk.java.net/jeps/328
java Command - JDK 11 Tools and Commands Reference
https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE
Oracle Code One 2018 Production-Time Profiling and Diagnostics on the JVM
https://static.rainfocus.com/oracle/oow18/sess/1524413833476001nSDg/PF/
ProductionTimeProfiling_DEV4507_1540434986395001v92K.pdf
Using Java Flight Recorder With OpenJDK 11
https://dzone.com/articles/using-java-flight-recorder-with-openjdk-11-1
65. Mission Control Project
https://wiki.openjdk.java.net/display/jmc
JMC 7 Early-Access Builds
http://jdk.java.net/jmc/
JDK Mission Control Tutorial
https://github.com/thegreystone/jmc-tutorial
Jfokus Developer Conference 2018 Mission Possible - Near zero overhead profiling
https://www.jfokus.se/jfokus18/preso/Mission-Possible--Near-zero-overhead-profiling.pdf