RFR: 8304716: Clean up G1Policy::calc_max_old_cset_length() [v2]
Thomas Schatzl
tschatzl at openjdk.org
Thu Mar 23 11:38:19 UTC 2023
On Thu, 23 Mar 2023 11:28:35 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>>
>> ayang review, break formula a bit
>
> src/hotspot/share/gc/g1/g1Policy.cpp line 1403:
>
>> 1401: // number of old regions added to the CSet irrespective of how many
>> 1402: // of them are available.
>> 1403: double result = (double)_g1h->num_regions() * (size_t)G1OldCSetRegionThresholdPercent / 100;
>
> Why `size_t` here? I'd expect everything is `double` on this line.
The `size_t` is a leftover from previous code, which has not been necessary for a long time (I think a long time ago `uintx` has been different to `size_t` on some long-lost platform, hence the casts of `uintx` to `size_t` in a few places in code).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13148#discussion_r1146050056
More information about the hotspot-gc-dev
mailing list