Paul Krill
Editor at Large

Advanced profiling proposed for Java Flight Recorder

news
Feb 14, 20242 mins

Skogsluft project would introduce profiling features that span Java and native code execution and provide more precise and flexible profiling options.

shutterstock 1710798856 airplane cockpit instrument panel
Credit: Armin E / Shutterstock

Java’s profiling capabilities would be improved within the Java Flight Recorder (JFR), a tool for collecting diagnostic and profiling data in running Java applications, under a proposal floating in the OpenJDK community.

Called Skogsluft, the project would introduce advanced profiling features to bridge the gap between Java and native code execution and offer more precise and flexible profiling options. Skogsluft would focus on three key enhancements, the proposal states:

  • An improved stackwalker, capable of walking mixed Java and native stacks. This would provide developers with a more coherent view of stack traces, particularly in applications where Java and native code are interwoven.
  • A flexible CPU sampler scheduler. For Linux, this would be on perf_event_open or timer_create. For macOS, itimer would be used. For other operating systems, the system would fall back to standard execution samples. This enhancement is intended to offer more accurate, adaptable CPU sampling.
  • Labeling support for JFR, with developers able to set per-thread-key-value labels that are incorporated into any JFR event. This labeling would provide richer context in profiling data, enabling more targeted debugging and analysis.

The JFR API would be extended to support easy and flexible labeling of threads to ensure that the labels are consistently captured in profiling data. The project would start with a clone of the planned JDK 23 mainline release, which is due in September, and track mainline releases going forward.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author