RFR: 8329469: Generational ZGC: Move the methods forwarding_[index|find|insert] from zRelocate.cpp to ZForwarding [v3]

Stefan Karlsson stefank at openjdk.org
Tue Apr 9 15:04:12 UTC 2024


On Tue, 9 Apr 2024 13:45:22 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> Hi all,
>> 
>> This patch moves the methods `zRelocate.cpp/forwarding_[index|find|insert]`  from the file `zRelocate.cpp` to the class `ZForwarding`.  The first parameter of the methods `zRelocate.cpp/forwarding_[index|find|insert]` is always `ZForwarding*`. These methods should be placed in the class `ZForwarding` so that the first parameter `ZForwarding*` can be added by the compiler and then it can improve the encapsulation.
>> 
>> But the non-generational ZGC can't make such a move because the method signatures may be duplicate.
>> 
>> The test `make test-tier1_gc` passed locally. Thanks for taking the time to review.
>> 
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add blank lines.

Looks good.

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

Marked as reviewed by stefank (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18579#pullrequestreview-1989321509


More information about the hotspot-gc-dev mailing list