Skip Headers
Previous
Previous
 
Next
Next

Improving the Fidelity of the JFR Method Profiler

One nice property of the JFR method profiler is that it does not require threads to be at safe points in order for stacks to be sampled. However, since the common case is that stacks will only be walked at safe points, HotSpot normally does not provide metadata for non-safe point parts of the code, which means that such samples will not be properly resolved to the correct line number and BCI. That is, unless you specify:

-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints

With DebugNonSafepoints, the compiler will generate the necessary metadata for the parts of the code not at safe points as well.