RFR: 8370520: GenShen: Track and report on promotion failures [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Oct 24 20:36:02 UTC 2025
On Fri, 24 Oct 2025 20:29:41 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use atomic load when reading promotion failure counters
>
> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 684:
>
>> 682: const size_t gc_id = heap->control_thread()->get_gc_id();
>> 683:
>> 684: AtomicAccess::inc(&_promotion_failure_count);
>
> Just noticing that in the next code block, we acquire the heap->lock(). Could we just use that same heap lock to protect adjustments to _promotion_failure_count and _promotion_failure_words and then we would need to use Atomic access operations?
Should probably be ok to read these variables without lock. We're only logging these results when evacuation is no longer happening. Right?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27962#discussion_r2461905434
More information about the shenandoah-dev
mailing list