RFR: 8370520: GenShen: Track and report on promotion failures

Aleksey Shipilev shade at openjdk.org
Fri Oct 24 14:27:39 UTC 2025


On Thu, 23 Oct 2025 22:46:00 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.

Looks fine, with a nit.

src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.hpp line 129:

> 127:   // Return the count and size (in words) of failed promotions since the last reset
> 128:   size_t get_promotion_failed_count() const { return _promotion_failure_count; }
> 129:   size_t get_promotion_failed_words() const { return _promotion_failure_words; }

Shouldn't these be `AtomicAccess::load(...)`-s? I don't think you need memory ordering, but if you are doing the updates atomically somewhere, it stands to reason you want to match the loads with atomics as well.

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27962#pullrequestreview-3377147963
PR Review Comment: https://git.openjdk.org/jdk/pull/27962#discussion_r2460754950


More information about the shenandoah-dev mailing list