RFR: 8368006: Parallel: Skip full regions in dense prefix during Full GC [v2]

Francesco Andreuzzi fandreuzzi at openjdk.org
Wed Sep 24 14:52:23 UTC 2025


On Fri, 19 Sep 2025 15:09:25 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Implement skip-full-region optimization for filler related operations on dense-prefix. I constrained the filler-creation task to a single worker for simpler implementation. During the compaction phase, the most expensive part is almost always the non-dense-prefix part, so letting the rest of workers to start with the expensive tasks seems sensible.
>> 
>> Synthetic bms shows good reduction in full-gc time in debug build; perf-neutral for other bms (specjvm2008,specjbb2015) in release build.
>> 
>> Test: tier1-5
>
> Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - review
>  - Merge branch 'master' into pgc-skip-full-region
>  - pgc-skip-full-region

Marked as reviewed by fandreuzzi (Author).

src/hotspot/share/gc/parallel/psParallelCompact.cpp line 1721:

> 1719:   for (HeapWord* cur_addr = start_addr; cur_addr < end_addr; /* empty */) {
> 1720:     RegionData* cur_region_ptr = _summary_data.addr_to_region_ptr(cur_addr);
> 1721:     if (cur_region_ptr->data_size() == region_size) {

The next lines up to `cur_addr += cur_region_ptr->partial_obj_size()` could possibly be extracted to a common function? Then you could check again if `cur_region_ptr->data_size() == region_size` to decide if you should `continue`.

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

PR Review: https://git.openjdk.org/jdk/pull/27369#pullrequestreview-3263306979
PR Review Comment: https://git.openjdk.org/jdk/pull/27369#discussion_r2376065971


More information about the hotspot-gc-dev mailing list