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

William Kemper wkemper at openjdk.org
Mon Feb 9 22:00:03 UTC 2026


On Mon, 9 Feb 2026 20:25:53 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

>> 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/shenandoahOldGeneration.cpp line 641:
> 
>> 639:       // when the in-place-promotion is completed. Such a region may be used for additional
>> 640:       // promotions in the same cycle it was itself promoted.
>> 641:       _card_scan->update_card_table(region->get_top_at_evac_start(), region->top());
> 
> parallel_heap_region_iterate(which is used by for_each_region)  use single thread if the number of is <= 4096; the assumption is for most of lightweight task, for example, capturing TAMS at init mark, the overhead of multiple threads is more expensive than the task itself.  For more complicated task, we may not want to use parallel_heap_region_iterate, I had a [PR](https://github.com/openjdk/jdk/pull/28613) recently to address this kind of issue in bitmap reset.
> 
> I'm not sure update_card_table is suitable to use parallel_heap_region_iterate after reading the impl, I saw you also added timing metrics for it, you can do  some simple test to verify it.

I added it as a timed phase, but not as a parallel worker phase so it won't show the break down of time per thread. The work could be kind of "lumpy" in that only _some_ old regions will accepted evacuations. I will try some experiments to force parallelization.

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

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


More information about the hotspot-gc-dev mailing list