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

William Kemper wkemper at openjdk.org
Fri Jun 23 21:54:55 UTC 2023


On Fri, 23 Jun 2023 21:34:54 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

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

That's a good catch. We do check this condition, but we do it after we set the sentinel that indicates this region should be promoted. I'll fix this.

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

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


More information about the shenandoah-dev mailing list