RFR: 8273626: G1: Factor out concurrent segmented array from G1CardSetAllocator [v5]

Hamlin Li mli at openjdk.java.net
Fri Oct 15 01:05:51 UTC 2021


On Thu, 14 Oct 2021 21:53:08 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   refine code; fix polymorphic issue in G1SegmentedArray's alloc_options
>
> src/hotspot/share/gc/g1/g1CardSet.cpp line 94:
> 
>> 92:   _bitmap_hash_mask = ~(~(0) << _log2_num_cards_in_howl_bitmap);
>> 93: 
>> 94:   init_card_set_alloc_options();
> 
> There's much code duplication btw the two constructors of `G1CardSetConfiguration::G1CardSetConfiguration`. Now that this PR touches it, it could be good if this can be dealt with, instead of repeating more code, `init_card_set_alloc_options();` specifically.

Per discussion with Thomas, it's better to stick to the scheme that we only do simplest refactoring when do refactoring, I'm afraid that this refactoring is already too complicated, so can I do it in another issue if you don't mind?

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

PR: https://git.openjdk.java.net/jdk/pull/5478



More information about the hotspot-gc-dev mailing list