RFR: 8303252: G1: Return early from Full-GC if no regions are selected for compaction. [v2]
Albert Mingkun Yang
ayang at openjdk.org
Tue Feb 28 20:02:09 UTC 2023
On Tue, 28 Feb 2023 13:58:57 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Please review this change to return early from full-gc in case no regions have been selected as targets for compaction.
>> To skip `phase3_adjust_pointers` and `phase4_do_compaction()`, we need to decouple cleanup work that was piggybacked onto these phases. Thus, the `phase5_` is introduced to do the cleanup.
>>
>> Testing: Tier 1-3.
>
> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
>
> Thomas review
src/hotspot/share/gc/g1/g1FullCollector.cpp line 217:
> 215: phase4_do_compaction();
> 216: } else {
> 217: log_info(gc, phases) ("No Regions selected for compaction. Skipping Phase 3: Adjust pointers and Phase 4: Compact heap");
A comment on when this will be the case would be nice. As I understand it, it's `all regions are almost full & max-compaction == false`.
-------------
PR: https://git.openjdk.org/jdk/pull/12768
More information about the hotspot-gc-dev
mailing list