RFR: 8302780: Add support for vectorized arraycopy GC barriers [v5]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Fri Feb 24 15:28:11 UTC 2023
On Fri, 24 Feb 2023 12:50:42 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>> So far, the arraycopy stubs have performed some kind of bulk pre/post barriers for arraycopy, which have been good enough, and allowed the copying itself to be done with plain loads and stores. For generational ZGC, this approach is not good enough, and we need barriers for the actual copying, but instead don't need the pre/post barriers. To prepare the JVM for generational ZGC, we need to add an API for arraycopy barriers.
>
> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
>
> Move bs declaration up
src/hotspot/cpu/x86/stubGenerator_x86_64_arraycopy.cpp line 1223:
> 1221: UnsafeCopyMemoryMark ucmm(this, !aligned, false, ucme_exit_pc);
> 1222: // Copy in multi-bytes chunks
> 1223: copy_bytes_forward(end_from, end_to, qword_count, rax, r10, L_copy_bytes, L_copy_8_bytes, decorators, T_BYTE);
Why is `setup_arg_regs_using_thread()` not needed to free `r10` as a temporary register in `generate_[conjoint|disjoint]_[byte|short]_copy()`? From the following comment, it sounds like it would be needed:
https://github.com/openjdk/jdk/blob/7d8b8ba9c46475ededcae7db6c841b25fa83d167/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp#L1193-L1195
-------------
PR: https://git.openjdk.org/jdk/pull/12670
More information about the hotspot-dev
mailing list