RFR: JDK-8262068: Improve G1 Full GC by skipping compaction for regions with high survival ratio [v11]
Hamlin Li
mli at openjdk.java.net
Fri Mar 26 09:32:35 UTC 2021
On Fri, 26 Mar 2021 08:17:39 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/g1FullGCCompactTask.cpp line 49:
>
>> 47: // by _region_attr_table, so here we use _region_attr_table rather than
>> 48: // HeapRegion itself to tell whether a region is pinned.
>> 49: if (!_collector->is_in_pinned_or_closed(hr_index)) {
>
> The original code uses only `r->is_pinned()`, not `r->is_pinned_or_closed()`.
> This predicate is wrong, `closed` regions may not be pinned (but can be, and in most cases are).
I'm not sure, but per code suggests in src/hotspot/share/gc/g1/heapRegionType.hpp, seems closed region should be a pinned as well. Or miss something? Would you mind to clarify this point?
ArchiveMask = 32,
OpenArchiveTag = ArchiveMask | PinnedMask,
ClosedArchiveTag = ArchiveMask | PinnedMask + 1
-------------
PR: https://git.openjdk.java.net/jdk/pull/2760
More information about the hotspot-gc-dev
mailing list