Java Flight Recorder
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
record JFR data from a running service.
Planned topics
- JFR is a low-overhead event recorder built into the JVM, with a continuous mode.
- Start at launch:
-XX:StartFlightRecording=filename=shop.jfr,duration=120s, or on a live process:jcmd <pid> JFR.start, thenJFR.dump. - Events: CPU samples, allocation, GC, locks, I/O, thread states, exceptions.
- Profiles (default vs profile settings) trade detail against overhead.
- Verify option details for your JDK before recording.
Draft outline details
Demonstration
jcmd <pid> JFR.start name=shop settings=profile duration=120s filename=shop.jfrCheck your understanding
Why is JFR suitable for production?
Show answer
Low overhead and built into the JVM.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.