RFR: JDK-8262068: Improve G1 Full GC by skipping compaction for regions with high survival ratio [v14]
Hamlin Li
mli at openjdk.java.net
Thu Apr 8 10:06:58 UTC 2021
On Wed, 7 Apr 2021 10:33:32 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add sanity check; refine code in update_attribute_table.
>
> src/hotspot/share/gc/g1/g1FullCollector.cpp line 229:
>
>> 227:
>> 228: void G1FullCollector::update_attribute_table(HeapRegion* hr) {
>> 229: if (hr->is_free()) {
>
> Another item that has been noted in a recent discussion with @albertnetymk is that with this change "Free" regions are also marked as `normal` in the table. It would be better to keep them as "Invalid".
>
> I.e. something like (incorporating @albertnetymk other suggestion):
>
> if (hr->is_free()) {
> return;
> } else if (hr->is_closed_archive(...) {
> [...]
> } else if (hr->is_pinned() || force_pinned) {
> [...]
> } else {
> [...]
> }
>
> There is no real difference as "Free" regions should never be referenced anywhere and the code should assert elsewhere. It's still nice to also have "Free" regions as `Invalid` in that table though.
not exactly. please check previous discussion at https://github.com/openjdk/jdk/pull/2760#discussion_r602144952.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2760
More information about the hotspot-gc-dev
mailing list