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

Thomas Schatzl tschatzl at openjdk.java.net
Thu Mar 18 12:42:39 UTC 2021


On Thu, 11 Mar 2021 15:37:04 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix bot crash.
>
> The change should support `MarkSweepAlwaysCompactCount` (just adapt the threshold).
> 
> The "last ditch" collection should also fully compact, as well as probably a System.gc() call. I do not know the exact rules for the other collectors right now.
> 
> Please update the summary with these (and the earlier mentioned) requirements and approach.

After a short look I think the only changes that are needed to get a region to be considered pinned in the g1 full gc is in `G1FullCollector::update_attribute_table()` to set these regions that are too full as "pinned" for that collection.

There are two places in `G1FullCollector` where that attribute table isn't used yet, but the code uses `HeapRegion::is_pinned()` directly (search for `r->is_pinned()` in the full gc files, I think both are located in `g1FullGCCompactTask.cpp`). These should be rerouted to that table I think.

After that change everything should basically be still working.

No guarantees though.

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

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



More information about the hotspot-gc-dev mailing list