RFR: 8275381 G1: refactor 2 constructors of G1CardSetConfiguration
Thomas Schatzl
tschatzl at openjdk.java.net
Wed Oct 20 12:07:07 UTC 2021
On Wed, 20 Oct 2021 08:45:38 GMT, Hamlin Li <mli at openjdk.org> wrote:
> 2 constructors of G1CardSetConfiguration share some code, it's better to refacoring them to simplify the code.
Changes requested by tschatzl (Reviewer).
src/hotspot/share/gc/g1/g1CardSet.cpp line 51:
> 49: G1RemSetArrayOfCardsEntries,
> 50: (double)G1RemSetCoarsenHowlBitmapToHowlFullPercent / 100,
> 51: 0,
Mabye add a `/* max_buckets_in_howl */` comment here to the right of the value.
src/hotspot/share/gc/g1/g1CardSet.hpp line 67:
> 65: void init(uint inline_ptr_bits_per_card,
> 66: uint num_cards_in_array,
> 67: double cards_in_bitmap_threshold,
To avoid confusion with the actual "threshold" variables I would prefer if these were named "threshold_percent" (or ratio because our percent values are typically ranging from 0 to 100).
At least it's confusing in the `init` implementation when it reads:
_something = some_variable * something
I.e. `something` not directly assigned to `_something` like other code.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6033
More information about the hotspot-gc-dev
mailing list