RFR: 8282621: G1: G1SegmentedArray remove unnecessary template parameter
Kim Barrett
kbarrett at openjdk.java.net
Fri Mar 4 19:21:03 UTC 2022
On Fri, 4 Mar 2022 11:28:14 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.
src/hotspot/share/gc/g1/g1CardSetMemory.cpp line 73:
> 71: template <class Slot>
> 72: G1CardSetAllocator<Slot>::G1CardSetAllocator(const char* name,
> 73: const G1CardSetAllocOptions* alloc_options,
There don't seem to be any specializations of this other than `G1CardSetAllocator<G1CardSetContainer>`. Unless there are future planned specializations it seems like there's no need for the new non-template base class. Just get rid of the template parameter and directly replace uses of `Slot` with `G1CardSetContainer`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7689
More information about the hotspot-gc-dev
mailing list