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 17:36:42 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Keep track of promotion failures. Report the number of failures and total number of bytes that could not be promoted. These changes were hoisted out of https://github.com/openjdk/jdk/pull/27632.
>
> 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?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27962#discussion_r2461900363


More information about the shenandoah-dev mailing list