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

Roman Kennke rkennke at openjdk.java.net
Wed Jun 1 23:17:33 UTC 2022


On Fri, 8 Apr 2022 02:49:21 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:
> 
>   remove unused variables and their dependency

I *hink* it makes sense. It is not exactly a backport, but rather a re-write, and I find it difficult to follow and convince myself that it's doing the correct thing. Therefore it seems somewhat risky.

src/hotspot/share/gc/g1/g1ParScanThreadState.cpp line 94:

> 92:   uint length = _g1h->collection_set()->young_region_length();
> 93:   for (uint region_index = 0; region_index < length; region_index++) {
> 94:     surviving_young_words[region_index] += G1ParScanThreadState::surviving_young_words()[region_index];

Was that code using the wrong index before? IOW, it used the surviving_young_words of the wrong regions?

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

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


More information about the jdk-updates-dev mailing list