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

Guoxiong Li gli at openjdk.org
Tue Apr 2 13:39:25 UTC 2024


> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Mark several methods as private. Reduce cursor.
 - Merge branch 'master' into MOVE_FORWARDING
 - Move methods about ZForwarding.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18579/files
  - new: https://git.openjdk.org/jdk/pull/18579/files/d37f0eca..e41b93bc

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18579&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18579&range=00-01

  Stats: 3960 lines in 46 files changed: 1267 ins; 1977 del; 716 mod
  Patch: https://git.openjdk.org/jdk/pull/18579.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18579/head:pull/18579

PR: https://git.openjdk.org/jdk/pull/18579


More information about the hotspot-gc-dev mailing list