Java’s profiling capabilities can be improved throughout the Java Flight Recorder (JFR), a device for amassing diagnostic and profiling information in working Java purposes, below a proposal floating within the OpenJDK neighborhood.
Referred to as Skogsluft, the mission would introduce superior profiling options to bridge the hole between Java and native code execution and provide extra exact and versatile profiling choices. Skogsluft would concentrate on three key enhancements, the proposal states:
- An improved stackwalker, able to strolling combined Java and native stacks. This would offer builders with a extra coherent view of stack traces, notably in purposes the place Java and native code are interwoven.
- A versatile CPU sampler scheduler. For Linux, this could be on perf_event_open or timer_create. For macOS, itimer can be used. For different working methods, the system would fall again to plain execution samples. This enhancement is meant to supply extra correct, adaptable CPU sampling.
- Labeling help for JFR, with builders in a position to set per-thread-key-value labels which might be integrated into any JFR occasion. This labeling would offer richer context in profiling information, enabling extra focused debugging and evaluation.
The JFR API can be prolonged to help simple and versatile labeling of threads to make sure that the labels are persistently captured in profiling information. The mission would begin with a clone of the deliberate JDK 23 mainline launch, which is due in September, and monitor mainline releases going ahead.
Copyright © 2024 IDG Communications, Inc.


