Datadog
Read post

Unbiased Java CPU profiling with JFR in JDK 25

Modern Java profilers face a fundamental tradeoff: JFR's ExecutionSample event is safe but biased, while AsyncGetCallTrace provides accuracy but relies on unsupported JVM internals. Engineers from Datadog, SAP, Amazon, and the OpenJDK community collaborated to solve this by introducing a new first-class CPU profiling event in JDK 25. The solution uses cooperative stack walking — recording lightweight execution points and deferring stack unwinding to safepoints — eliminating the need to choose between safety and accuracy. The new JFR-based CPU sampling event is available as an experimental feature in JDK 25, and the Datadog Java profiler already uses it when available. Future work includes native frame support, on-demand stack capture, and eventually eliminating AsyncGetCallTrace dependency for wall-clock sampling.

    #java#jvm
Jul 22•11m read time•From datadoghq.com
Post cover image
Table of contents
How profilers workProfiling on the JVM todayAnother path: AsyncGetCallTraceImproving the foundationThe outcomeWhat’s next?Continuing to improve JVM profilingResources
8.6K Impressions
Datadog's image
Datadog

DataDog Blog offers insights, tutorials, and updates on monitoring, analytics, and observability sol...

170 Followers

•

568 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard