RFR: 8253303 G1: Move static initialization of G1FromCardCache to a proper location
Thomas Schatzl
thomas.schatzl at oracle.com
Fri Sep 18 13:26:27 UTC 2020
Hi,
On 18.09.20 15:22, Albert Mingkun Yang wrote:
> On Fri, 18 Sep 2020 11:17:08 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>
>> in src/hotspot/share/gc/g1/g1RemSet.cpp:
>>
>> 488 void G1RemSet::initialize(uint max_reserved_regions) {
>> 489 G1FromCardCache::initialize(num_par_rem_sets(), max_reserved_regions);
>> 490 _scan_state->initialize(max_reserved_regions);
>> 491 }
>>
>> the static initialization is piggy-backed to G1RemSet instance initialization which is rather bad style. Fortunately
>> there is only one G1RemSet instance and that method is only called once so no functional issue.
>> This change moves the initialization call, and after a bit of analysis move some more related code to more appropriate
>> places.
>> Testing: local compilation, jtreg gc/g1, tier1-3 running
>
> Marked as reviewed by ayang (Author).
>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/247
>
thanks for your review.
Thomas
More information about the hotspot-gc-dev
mailing list