RFR: 8277893: Arraycopy stress tests
Vladimir Kozlov
kvn at openjdk.java.net
Tue Nov 30 19:29:07 UTC 2021
On Mon, 29 Nov 2021 13:28:33 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> I would like to fork the new tests off the JDK-8150730. These tests were instrumental in capturing many bugs in my arraycopy work, and I think they are good on their own merit, because they provide a test for the current baseline and on-going minor improvements in arraycopy on all platforms, not only x86_64, and they might be cleanly backportable.
>
> A brief tour of these tests:
>
> - Tests all data types;
> - Tests small arrays exhaustively, which captures conjoint/disjoint cases, errors near the edges, etc;
> - Tests large arrays with fuzzing around powers of two and powers of ten, both conjoint and disjoint cases;
> - Tests all available compilation modes for arraycopy stubs; for example, running on AVX-512 enabled machine runs all versions down to `-XX:UseAVX=0 -XX:UseSSE=0` cases;
> - Tests with/without compressed oops mode -- theoretically only needed for `Object` copies, but Hotspot cobbles together int+coops and long+no-coops loops, so I decided to alternate coops mode for all data types;
>
> My previous version used individual `@run` clauses for all configurations, but I think the Java driver is cleaner and easier to maintain.
>
> Test times:
>
>
> # x86_64 (TR 3970X)
> real 9m11.037s
> user 78m2.766s
> sys 0m19.873s
>
> # x86_32 (TR 3970X)
> real 13m39.054s
> user 147m38.308s
> sys 0m10.924s
>
> # x86_64 (i5-11500)
> real 41m32.622s
> user 447m19.986s
> sys 0m21.026s
>
> # AArch64 (ThunderX2)
> real 5m34.210s
> user 45m16.015s
> sys 0m24.723s
>
>
> Since these tests are quite long, especially on small machines, I hooked them up to `hotspot:tier3`.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `compiler/stress/arraycopy`
> - [x] Linux x86_32 fastdebug `compiler/stress/arraycopy`
> - [x] Linux AArch64 fastdebug `compiler/stress/arraycopy`
I assume that `test/micro/org/openjdk/bench/java/lang` micros cover all these cases. Otherwise you may need to add some.
test/hotspot/jtreg/TEST.groups line 183:
> 181:
> 182: tier3_compiler = \
> 183: compiler/arraycopy/stress
Can you introduce separate group for this? For example `hotspot_arraycopy_stress` and use it here.
I am fine with introduced `tier2|3_compiler` groups but it will help us in Oracle to have separate group for `arraycopy` so we can schedule its testing on proper machines.
test/hotspot/jtreg/compiler/arraycopy/stress/AbstractStressArrayCopy.java line 32:
> 30: * Max array size to test.
> 31: */
> 32: static final int MAX_SIZE = 1024*1024 + 1;
Do we really need such big arrays for regression testing. It may make sense for JMH but not for these tests I think.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6594
More information about the hotspot-compiler-dev
mailing list