RFR: 8352251: Implement JEP 518: JFR Cooperative Sampling [v16]

Martin Doerr mdoerr at openjdk.org
Tue May 13 20:05:54 UTC 2025


On Tue, 6 May 2025 21:13:34 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> I think your version is not nicely implementable on platforms which don't have an FP register, but I'll take a look and think about it.

Update: I was thinking about emulating `make_sender_fp_current` by modifying the Back Chain: `std(sender_fp, _abi0(callers_sp), R1_SP);`. This would also hide the top frame from the sampler such that it doesn't sample the top frame after the return safepoint check. However, this would break concurrent thread stack processing (used by ZGC and ShenandoahGC) which relies on the Back Chain: https://github.com/openjdk/jdk/blob/e7ce661adb01fba4bb690d51cc2858c822008654/src/hotspot/share/runtime/stackWatermark.inline.hpp#L104
Maybe we can find a way to discard samples after the return safepoint check?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24296#issuecomment-2877806001


More information about the hotspot-jfr-dev mailing list