RFR: 8282621: G1: G1SegmentedArray remove unnecessary template parameter [v2]

Kim Barrett kbarrett at openjdk.java.net
Fri Mar 4 21:46:00 UTC 2022


On Fri, 4 Mar 2022 20:13:29 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> Hi all,
>> 
>> Please review this refactoring change to remove unnecessary template parameters. The change has two commits, one to remove the template parameter, this allows for the second clean up to hoist `G1CardSetAllocator` parameter independent methods and variables into a base class.
>> 
>> Testing: Tier 1.
>
> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Kim review: remove template parameter completely

src/hotspot/share/gc/g1/g1CardSetContainers.hpp line 181:

> 179:   }
> 180: 
> 181:   ~G1CardSetContainer() = default;

I'd prefer the destructor declaration be close to the constructor, i.e. cluster the special function declarations.

src/hotspot/share/gc/g1/g1CardSetMemory.hpp line 87:

> 85: // own set of allocators, there is intentionally no padding between them to save
> 86: // memory.
> 87: class G1CardSetAllocator {

In the first sentence of the preceding block comment, "(Slot slots)" seems leftover from the template parameter.

src/hotspot/share/gc/g1/g1CardSetMemory.hpp line 96:

> 94:   G1CardSetAllocator(const char* name,
> 95:                          const G1CardSetAllocOptions* alloc_options,
> 96:                          G1CardSetFreeList* free_segment_list);

I think the indentation shouldn't be changed here - the parameters should be aligned.

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

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



More information about the hotspot-gc-dev mailing list