RFR: 8314972: GenShen: promote_in_place needs to prepare remembered set before it enables old allocations within region [v2]

Y. Srinivas Ramakrishna ysr at openjdk.org
Sun Aug 27 05:32:38 UTC 2023


On Fri, 25 Aug 2023 17:59:52 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Existing code (and some existing assertions in ShenandoahVerifier) expect the filler objects to be registered.  You make a good point though.  We don't really need these to be registered.  If the first or only object in a card range is a filler, remembered set scanning can just ignore that.  The remembered set scanner wants to find the first non-filler object in the range.  We might want to address this in a separate ticket later, if we decide to keep the current remembered set representation longer term.
>
> Note that the cost of registering filler objects is minimal because there are never multiple contiguous filler objects residing within memory.  We always coalesce them together.  At most, the cost during remembered set scanning is that we look at one extra filler object per DIRTY card.

I agree, I don't think it helps one way or other. In fact, the current card scanning code looks for the last object on the _previous_ card from which to start walking objects to scan. In the case that the filler object is entirely on a card, this does not make any difference. However, in the case that the filler object is straddling a card, registering it shortens the walk by one object, the one preceding the filler. I think any performance difference is a wash, and I'd just scratch my thought above.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/310#discussion_r1306602225


More information about the shenandoah-dev mailing list