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

Hamlin Li mli at openjdk.java.net
Tue Nov 23 01:01:13 UTC 2021


On Mon, 22 Nov 2021 14:43:22 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 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.

@albertnetymk Yes, such changes are only transient, they will be reverted in next PR.

Thanks @tschatzl @albertnetymk for your reviews.

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

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


More information about the hotspot-gc-dev mailing list