RFR: 8276670: G1: Rename G1CardSetFreePool and related classes

Hamlin Li mli at openjdk.java.net
Thu Nov 25 04:02:08 UTC 2021


On Wed, 24 Nov 2021 13:59:24 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> As G1CardSetFreePool and related classes are going to be reused outside of the remembered set, they should be renamed.
>
> src/hotspot/share/gc/g1/g1CardSetMemory.hpp line 147:
> 
>> 145: public:
>> 146:   G1CardSetMemoryManager(G1CardSetConfiguration* config,
>> 147:                          G1SegmentedArrayFreePool<mtGCCardSet>* free_list_pool);
> 
> Instead of using `G1SegmentedArrayFreePool<mtGCCardSet>` explicitly, I think the current name, `G1CardSetFreePool`, is more meaningful in this context (user site).
> 
> Therefore, I wonder if it's possible to place `using G1CardSetFreePool = G1SegmentedArrayFreePool<mtGCCardSet>` somewhere and keep using the current name.

good idea!

> src/hotspot/share/gc/g1/g1SegmentedArrayFreeMemoryTask.hpp line 86:
> 
>> 84: 
>> 85: public:
>> 86:   explicit G1SegmentedArrayFreeMemoryTask(const char* name);
> 
> Looking at the call-site and implementation of `execute()` method, I am not sure this class is generic enough to be called `G1SegmentedArrayFreeMemoryTask`. (Maybe this class will be used for sth other than Card Set in the near future?)

Yes, it will be used by some other places, e.g. evecuation failure processing. This class and related others will be refactored further to be more generic after the move and rename.

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

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



More information about the hotspot-gc-dev mailing list