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

Albert Mingkun Yang ayang at openjdk.java.net
Wed Apr 7 11:49:56 UTC 2021


On Wed, 7 Apr 2021 10:29:26 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/heapRegion.hpp line 174:
>> 
>>> 172:   void reset_compacted_after_full_gc();
>>> 173:   // Update pinned heap region (not compacted) to be consistent after Full GC.
>>> 174:   void reset_not_compacted_after_full_gc();
>> 
>> Now that this version uses the existing "pinned" mechanism to skip high-live-ratio regions, this method can retain its original name/implementation, right?
>
> That is true, full gc reuses the mechanism originally implemented for pinned regions. However "pinned" is something very specific in G1 context so I think it is better to use a different, more generic name. The regions that are not compacted (and not yet pinned) are not really temporarily pinned.
> 
> There has been an earlier discussion (not sure if here in this PR) to actually rename the use of "pinned" in G1 full gc to use "not compacted" too, resulting in a CR to rename this (in [JDK-8264423](https://bugs.openjdk.java.net/browse/JDK-8264423)).
> 
> However I was going to wait for this change to go in before sending out a PR.
> 
> Also this "not_compacted" name better matches the "compacted" method name above.
> 
> So I would prefer to keep this as is.

I see; agree.

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

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



More information about the hotspot-gc-dev mailing list