RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3]

William Kemper wkemper at openjdk.org
Thu Feb 5 17:34:21 UTC 2026


On Thu, 5 Feb 2026 17:31:58 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched.
>
> William Kemper has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - Merge branch 'more-precise-rset-rebuild' into dirty-all-the-cards
>  - Clear card table for young regions when full gc rebuilds remembered set
>  - Dirty all the cards en masse
>    
>    This might be faster if less precise.

src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1558:

> 1556:       // coalesce-and-fill processing.
> 1557:       r->end_preemptible_coalesce_and_fill();
> 1558:       _heap->old_generation()->clear_cards_for(r);

Clearing the card table and object starts when allocating new old regions likely contributed to slower evacuations in old generation. Cards are now cleared when old regions are recycled. We must also do this when a full GC switches the affiliation of regions from young to old.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2770328359


More information about the shenandoah-dev mailing list