RFR: 8304712: Only pass total number of regions into G1Policy::calc_min_old_cset_length

Albert Mingkun Yang ayang at openjdk.org
Wed Mar 22 18:27:33 UTC 2023


On Wed, 22 Mar 2023 16:33:11 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this change that refactors `G1Policy::calc_min_old_cset_length` to take only required parameters and also just use `ceil()` for the calculation. It just does not matter to be clever here imo.
> 
> Testing: gha
> 
> Thanks,
>   Thomas

Marked as reviewed by ayang (Reviewer).

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

> 1381: }
> 1382: 
> 1383: uint G1Policy::calc_min_old_cset_length(uint num_marked_regions) const {

I actually think the previous signature is easier to read; The name, `num_marked_regions`, doesn't tell me it's in fact the number of candidates.

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

PR Review: https://git.openjdk.org/jdk/pull/13147#pullrequestreview-1353231331
PR Review Comment: https://git.openjdk.org/jdk/pull/13147#discussion_r1145242882


More information about the hotspot-gc-dev mailing list