[jdk11u-dev] RFR: 8228609: G1 copy cost prediction uses used vs. actual copied bytes [v6]

Martin Doerr mdoerr at openjdk.java.net
Thu Apr 7 15:01:41 UTC 2022


On Sat, 2 Apr 2022 06:02:19 GMT, Yude Lin <duke at openjdk.java.net> wrote:

>> I would like to backport 8228609 which fixes a prediction error regarding cost per bytes copied.
>> 
>> The patch does not apply cleanly, so this backport is basically changing the calculation of copied bytes.
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8227442 is not in 11u. So this patch also uses G1ParScanThreadState::surviving_young_words() in place of _surviving_young_words to adjust for the correct cset index.
>
> Yude Lin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   trigger GitHub actions

This change is very different from the original one, but fixing it in 11u sounds feasible to me. We'll test it.
Do you have a specific test case which allows observing unstable gc frequency?

src/hotspot/share/gc/g1/g1Policy.cpp line 669:

> 667:     _analytics->report_rs_length_diff((double) rs_length_diff);
> 668: 
> 669:     size_t freed_bytes = heap_used_bytes_before_gc - cur_used_bytes;

`freed_bytes` is now unused.

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

PR: https://git.openjdk.java.net/jdk11u-dev/pull/927


More information about the jdk-updates-dev mailing list