RFR: 8332527: ZGC: generalize object cloning logic [v3]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Fri May 24 12:01:14 UTC 2024


> This changeset generalize the logic to produce a runtime call to clone a class instance so that it can be shared by other collectors adopting the late barrier expansion model (including G1 in the near future, see [JEP 475](https://openjdk.org/jeps/475)). The changeset moves the logic from `ZBarrierSetC2` to the GC-shared `BarrierSetC2` class and adds support for 32-bits platforms.
> 
> #### Testing
> 
> - tier1-3 (windows-x64, linux-x64, linux-aarch64, macosx-x64, macosx-aarch64; release and debug mode).
> - tier4-7 (linux-x64, linux-aarch64; release and debug mode; ZGC tests only).
> - `compiler/arraycopy` tests (linux-x86-debug) with [an additional patch](https://github.com/openjdk/jdk/commit/ddcf777894e740b8e6ddbbf8821e82a173c23ef4) that implements cloning of large class instances with a runtime clone call rather than arraycopy when using G1 (to exercise the generalized logic on a 32-bits platform).

Roberto Castañeda Lozano has updated the pull request incrementally with one additional commit since the last revision:

  Generalize 'clone_instance_in_runtime' to also handle reflective array clones (as the original code)

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19311/files
  - new: https://git.openjdk.org/jdk/pull/19311/files/cf85edec..6f16bd75

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

  Stats: 14 lines in 3 files changed: 3 ins; 3 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/19311.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19311/head:pull/19311

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


More information about the hotspot-compiler-dev mailing list