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

Patricio Chilano Mateo pchilanomate at openjdk.org
Tue May 20 16:25:57 UTC 2025


On Tue, 20 May 2025 16:21:46 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>>> > Where do you suggest to place it best?
>>> 
>>> Should be in `FreezeBase::unwind_frames()`. That's where we change the anchor to the ContinuationEntry.
>> 
>> Fixed. Thanks.
>
>> That is very good spotted indeed. There is a race here if the top frame is invalidated and we just go with the sender (it would describe the carrier frames for the vthread, something I had some problems with in the very beginning).
>> 
>> My neurons about Continuations and "rbp in continuations" are unfortunately way off in DRAM, on some remote NUMA node to boot.
>> 
>> Can you help me think out how to handle the Continuation specific things in parsing here?
>>
> Ok, no need to bring it to cache since this has been fixed (modulo the extra check discussed) with the new approach. : )

> > > Where do you suggest to place it best?
> > 
> > 
> > Should be in `FreezeBase::unwind_frames()`. That's where we change the anchor to the ContinuationEntry.
> 
> Fixed. Thanks.
>
Thanks. Ideally we would avoid the extra overhead for the freeze fast path. We could always force the slow path when creating the sample request by setting _cont_fastpath_thread_state, which currently is only used for JVMTI to force the slow path on interpreted only mode. But I could take care of that as a follow up if you want. Can we inline the has_sample_request() check to avoid the call on the common case?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24296#discussion_r2098392703


More information about the hotspot-jfr-dev mailing list