RFR: 8376531: Genshen: Missing volatile modifier on multiple fields of ShenandoahOldGeneration [v2]
Xiaolong Peng
xpeng at openjdk.org
Wed Jan 28 00:34:44 UTC 2026
On Tue, 27 Jan 2026 23:41:05 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 585:
>>
>>> 583:
>>> 584: void ShenandoahOldGeneration::handle_failed_promotion(Thread* thread, size_t size) {
>>> 585: _promotion_failure_count.add_then_fetch(static_cast<size_t>(1));
>>
>> Can this be `1UL` instead of `static_cast<size_t>(1)`?
>
> Thanks, it should work, at least CLION doesn't complain.
`1UL` is working fine, I have updated the code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29456#discussion_r2734363277
More information about the hotspot-gc-dev
mailing list