Skip to content
Ameen Abozaid
Planned lessonMID-008-L02

Java Flight Recorder

  • Lesson 2 of 8
  • Mid-level
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, then JFR.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

text
jcmd <pid> JFR.start name=shop settings=profile duration=120s filename=shop.jfr

Check 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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.