RFR: 8366240: Improve memory ordering in new CPU Time Profiler

Kerem Kat krk at openjdk.org
Tue Sep 16 16:12:36 UTC 2025


On Wed, 27 Aug 2025 12:50:13 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

> Remove acq-rel semantics where it isn't needed.

src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 169:

> 167:   }
> 168:   if (_capacity < CPU_TIME_QUEUE_MAX_CAPACITY) {
> 169:     float ratio = (float)lost_samples_due_to_queue_full / (float)_capacity;

Can `_capacity` be zero here now?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26960#discussion_r2352999805


More information about the hotspot-jfr-dev mailing list