Flight Recorder gets sharper
Three JFR changes that make production profiling both cheaper and more honest.
Open this lesson in the learning hubKey points
- Traditional sampling profilers only sample at safepoints, which skews blame toward safepoint-heavy methods.
- JEP 518 adds cooperative sampling to reduce that bias and lower overhead.
- JEP 509 adds CPU-time profiling on Linux, so you see actual CPU rather than wall-clock time.
- JEP 520 adds method timing and tracing, so you can measure specific methods without an external agent.
- Together they close the gap between "always-on and cheap" and "accurate enough to act on".
Safepoint bias made old profiles quietly wrong - JFR in 25 is measuring closer to the truth.
This is a reading copy. The full lesson — with the visual explainer, the interactive lab and a Run button for the code — lives in the Java 25 Course course, and every lesson in it is listed on the Java 25 Course contents page.