RFR: 8352251: Implement JEP 518: JFR Cooperative Sampling [v23]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Thu May 15 21:57:57 UTC 2025
On Thu, 15 May 2025 20:33:21 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp line 187:
>>
>>> 185: request._sample_sp = request._sample_bcp;
>>> 186: // Get real bcp.
>>> 187: void* const bcp = interpreter_frame_bcp(request);
>>
>> Shouldn’t we get the bcp from the context instead? The one saved in the frame is not updated on each bytecode.
>
> That would, of course, be ideal, but I don't think there exists any abstraction to read the current bcp from the ucontext_t, abstracting it for all platforms.
We know which register we use in each platform so it should be same as getting any other register. You can always fallback to getting it from the frame as now for platforms other than x64 and aarch64.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24296#discussion_r2092012453
More information about the hotspot-jfr-dev
mailing list