RFR: 8302780: Add support for vectorized arraycopy GC barriers
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Fri Feb 24 10:29:02 UTC 2023
On Mon, 20 Feb 2023 15:23:04 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.
src/hotspot/cpu/x86/stubGenerator_x86_64_arraycopy.cpp line 1831:
> 1829: BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
> 1830: #if COMPILER2_OR_JVMCI
> 1831: if ((!is_oop || bs->supports_avx3_masked_arraycopy()) && VM_Version::supports_avx512vlbw() && VM_Version::supports_bmi2() && MaxVectorSize >= 32) {
Consider extending the test similarly in `generate_disjoint_int_oop_copy()` and `generate_conjoint_int_oop_copy()`, for consistency.
-------------
PR: https://git.openjdk.org/jdk/pull/12670
More information about the hotspot-dev
mailing list