RFR: 8337789: JEP 509: JFR CPU-Time Profiling (Experimental) [v47]
Andrei Pangin
apangin at openjdk.org
Wed May 7 22:54:02 UTC 2025
On Wed, 7 May 2025 21:31:22 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> It's used in the signal handlers of multiple threads (per thread signals) and at safepoints of all threads in parallel.
>>
>> Safepoints per thread can happen in parallel. Hope this clarifies it.
>
> Thank you for the explanation.
@zhengyu123 I don't see how a race you've described can happen. T2 will not reach `cmpxchg` to claim position 0, since an earlier check `if (state == state_empty(tail))` will fail in this case. Note that `state_empty(tail)` will be true for `tail == 1` but not for `tail == 3`. Or am I missing something?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r2078597131
More information about the hotspot-dev
mailing list