One nice property of the JFR method profiler is that it does not require for the threads to be at safe points 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:
With the DebugNonSafepoints, the compiler will generate the necessary metadata for the parts of the code not at safe points as well.
Big thanks to Doug Simon and Gilles Duboscq for noting this!