[jdk11u-dev] RFR: 8228609: G1 copy cost prediction uses used vs. actual copied bytes [v7]
Yude Lin
duke at openjdk.org
Fri Jul 8 04:04:51 UTC 2022
On Wed, 1 Jun 2022 23:13:21 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> Yude Lin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> remove unused variables and their dependency
>
> 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?
Yes, that's what I think.
So this pr is achieving two things (sorry if it were not clear):
1. fix the index issue: this causes calculation of the total surviving young words to be incorrect. The correct stats are stored in _surviving_young_words[1, .., n] instead of [0, .., n-1]
3. use a precise "copied bytes" instead of inferring from (used() - freed())
-------------
PR: https://git.openjdk.org/jdk11u-dev/pull/927
More information about the jdk-updates-dev
mailing list