Datadog

Unbiased Java CPU profiling with JFR in JDK 25 | Datadog

Jul 22, 2026Jaroslav Bachorík, Scott Gerring
Unbiased Java CPU profiling with JFR in JDK 25 | Datadog
SummaryAI, from the source post

This post details the collaboration with SAP, Amazon, and the OpenJDK community to introduce the `CPUTimeSample` event in JDK 25. This new event, combined with cooperative stack walking, provides accurate CPU-time sampling for Java applications, addressing the bias and incompleteness issues previously encountered with JFR's `ExecutionSample` and unsupported JVM internals like `AsyncGetCallTrace`. The post explains the mechanics of profilers, the limitations of existing JVM sampling, and the trade-offs involved in achieving accurate CPU profiling.

More from the Java CPU Profiling trail