On Mon, 2 Jun 2025 18:37:14 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> Johannes Bechberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix bug related to async stack walking > > src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 117: > >> 115: >> 116: bool JfrCPUTimeTraceQueue::is_empty() const { >> 117: return Atomic::load(&_head) == 0; > > Not entirely clear what is the memory semantics for accessing `_head`. Does > it need to be acq/rel? If so, this one should be `::load_acquire`? Many of the accesses to head do not appear to synchronize with anything and so do not need acquire semantics. But the overall concurrency properties of this code are very unclear to me. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2122228261