RFR: 8310680: GenShen: In-place region promotions may fail [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Fri Jun 23 20:36:54 UTC 2023


On Fri, 23 Jun 2023 20:33:42 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> There are a few small changes here:
>> * In `op-update-refs-final`, only active regions are aged.
>> * In `op-final-roots`, a region's age may be reset outside of an aging cycle.
>> * When the field used to save `top` before promotion is set, it indicates the region has been chosen for in-place-promotion.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix formatting

Thanks.  Looks good to me.

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1722:

> 1720:           r->promote_humongous();
> 1721:         } else if (r->is_regular() && (r->get_top_before_promote() != nullptr)
> 1722:                   && (r->garbage_before_padded_for_promote() < old_garbage_threshold)

I think my earlier guidance may have been wrong here.  I think we can rewrite this as:
else if (r->is_regular() && (r->get_top_before_promote() != nullptr)) {
  assert(r->garbage_before_padded_for_promote() < old_garbage_threshold, ...)
  assert (r->get_top_before_promote() == tams, ...)

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

Marked as reviewed by kdnilsen (Committer).

PR Review: https://git.openjdk.org/shenandoah/pull/290#pullrequestreview-1495967185
PR Review Comment: https://git.openjdk.org/shenandoah/pull/290#discussion_r1240350497


More information about the shenandoah-dev mailing list