RFR: JDK-8262068: Improve G1 Full GC by skipping compaction for regions with high survival ratio [v11]

Stefan Johansson sjohanss at openjdk.java.net
Fri Mar 26 11:02:32 UTC 2021


On Fri, 26 Mar 2021 08:04:22 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hamlin Li has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>> 
>>  - Merge branch 'master' into g1-full-gc-optimization-00
>>  - reuse the "pin" mechanism (G1FullCollector._region_attr_table) to skip region compaction;
>>    deal with last-ditch full gc;
>>  - Merge branch 'master' into g1-full-gc-optimization-00
>>  - fix bot crash.
>>  - fix crash in G1CalculatePointersClosure::prepare_for_skipping_compaction when klass of dead objects is unloaded;
>>    other misc improvements.
>>  - reuse vm option MarkSweepDeadRatio; reuse G1RegionMarkStatsCache class; fix regression in Mark phase by inlining live words collection into mark_object()
>>  - JDK-8262068: Improve G1 Full GC by skipping compaction for regions with high survival ratio
>
> src/hotspot/share/gc/g1/g1FullCollector.cpp line 244:
> 
>> 242:   } else {
>> 243:     // Update _region_attr_table after free pinned regions,
>> 244:     // as the region can not be accessed in G1ResetPinnedClosure.
> 
> Not sure what the comment wants to indicate. What does "after free pinned regions" mean here?
> If we need a comment I think something like "Everything else is processed normally." should be fine.
> But maybe this comment wants to make aware of something special, it's just I do not understand what it would mean.

This is a change in behavior to make sure we don't reset humongous regions that have been freed. I'm not sure we need this comment here. Setting the state to `normal` seems ok if we don't want a special state for `free`.

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

PR: https://git.openjdk.java.net/jdk/pull/2760



More information about the hotspot-gc-dev mailing list