RFR: 8277542: G1: Move G1CardSetFreePool and related classes to separate files

Albert Mingkun Yang ayang at openjdk.java.net
Mon Nov 22 14:46:31 UTC 2021


On Mon, 22 Nov 2021 11:38:07 GMT, Hamlin Li <mli at openjdk.org> wrote:

> As G1CardSetFreePool and related classes are going to be reused outside of the remembered set, they should be factored out.

I was using `git diff --color-moved` to help me review the diff. However, the unnecessary change to
`G1CardSetFreePool::free_list` (moving from hpp to cpp) introduced some friction. Please refrain from mixing mechanical and manual changes in the same commit; you can use a second commit in this PR for the manual tuning.

I see the same def is duplicated in two places:
in `g1SegmentedArrayFreePool.hpp`:

typedef G1SegmentedArrayBuffer<mtGCCardSet> G1CardSetBuffer;
typedef G1SegmentedArrayBufferList<mtGCCardSet> G1CardSetBufferList;

and `g1CardSetMemory.hpp`:


typedef G1SegmentedArrayBuffer<mtGCCardSet> G1CardSetBuffer;

typedef G1SegmentedArrayBufferList<mtGCCardSet> G1CardSetBufferList;


I believe such duplication is only transient -- later refactoring/renaming will fix this, so I am fine with the current PR.

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

Marked as reviewed by ayang (Reviewer).

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


More information about the hotspot-gc-dev mailing list