RFR: 8370520: GenShen: Track and report on promotion failures [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Fri Oct 24 20:36:03 UTC 2025


On Fri, 24 Oct 2025 20:31:52 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> 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?

Now that we have this new log message, can we get rid of the "promotion failure messages" for individual objects?

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

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


More information about the shenandoah-dev mailing list