Java’s profiling capabilities can be improved throughout the Java Flight Recorder (JFR), a device for accumulating diagnostic and profiling information in working Java functions, underneath a proposal floating within the OpenJDK neighborhood.
Known as Skogsluft, the undertaking would introduce superior profiling options to bridge the hole between Java and native code execution and supply extra exact and versatile profiling choices. Skogsluft would concentrate on three key enhancements, the proposal states:
- An improved stackwalker, able to strolling blended Java and native stacks. This would supply builders with a extra coherent view of stack traces, significantly in functions the place Java and native code are interwoven.
- A versatile CPU sampler scheduler. For Linux, this is able to be on perf_event_open or timer_create. For macOS, itimer can be used. For different working methods, the system would fall again to straightforward execution samples. This enhancement is meant to supply extra correct, adaptable CPU sampling.
- Labeling assist for JFR, with builders in a position to set per-thread-key-value labels which are included into any JFR occasion. This labeling would supply richer context in profiling information, enabling extra focused debugging and evaluation.
The JFR API can be prolonged to assist simple and versatile labeling of threads to make sure that the labels are constantly captured in profiling information. The undertaking 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.