RFR: 8366240: Improve memory ordering in new CPU Time Profiler
Johannes Bechberger
jbechberger at openjdk.org
Tue Sep 16 16:20:19 UTC 2025
On Tue, 16 Sep 2025 16:09:19 GMT, Kerem Kat <krk 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?
No, because _capacity is always increasing and starts with `20`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26960#discussion_r2353017471
More information about the hotspot-jfr-dev
mailing list