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

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri Jun 23 21:37:43 UTC 2023


On Fri, 23 Jun 2023 21:08:54 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:
> 
>   Assert that promotion conditions hold, rather than rechecking

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

> 1722:           assert(r->garbage_before_padded_for_promote() < old_garbage_threshold,
> 1723:                  "Region " SIZE_FORMAT " has too much garbage for promotion", r->index());
> 1724:           assert(r->get_top_before_promote() == tams,

Where was this second condition established when identifying a region as eligible for promotion-in-place? As far as I can see the second condition is tested _after_ the top has been saved.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/290#discussion_r1240424457


More information about the shenandoah-dev mailing list