This article explores the technical limitations of traditional Java Flight Recorder (JFR) sampling in identifying CPU-bound hotspots in production JVM environments. It explains the architectural shift from JVMTI-based approaches and AsyncGetCallTrace toward the implementation of a new, native CPU profiling event in OpenJDK. The collaboration highlights how these changes improve sample accuracy and reduce bias in continuous profiling for high-scale applications.
Key points
Traditional JVM sampling often introduces bias by making non-uniform decisions about when to capture stack traces.
Distinguishing between CPU-time sampling (finding computation hotspots) and wall-clock sampling (finding latency bottlenecks) is critical for effective performance analysis.
Relying on AsyncGetCallTrace presents stability and maintenance challenges compared to native, first-class JVM profiling hooks.
Open-source collaboration within the OpenJDK community is evolving the JVM to provide native, unbiased profiling data for production workloads.