On Wed, 4 Jun 2025 17:39:38 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:
>> Johannes Bechberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Readd lock > > src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 300: > >> 298: if (!Atomic::cmpxchg(&_disenrolled, false, true)) { >> 299: log_trace(jfr)("Disenrolling CPU thread sampler"); >> 300: if (Atomic::fetch_then_and(&_signal_handler_installed, false)) { > > fetch_then_and with false? Must be simpler way to express this? Like > Atomic::load(&_signal_handler_installed)? I also want to set it. Wanted to do a simple ::xchg, but this doesn't exist for booleans. > src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 608: > >> 606: void JfrCPUSamplerThread::stop_signal_handlers() { >> 607: // set the stop signal bit >> 608: Atomic::or_then_fetch(&_active_signal_handlers, STOP_SIGNAL_BIT, >> memory_order_acq_rel); > > Whatever was fetched is gone with the wind... I didn't find an Atomic::or method ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2127120548 PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2127122509