RFR: 8277893: Arraycopy stress tests
Aleksey Shipilev
shade at openjdk.java.net
Tue Nov 30 20:29:05 UTC 2021
On Tue, 30 Nov 2021 19:25:41 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> I assume that `test/micro/org/openjdk/bench/java/lang` micros cover all these cases. Otherwise you may need to add some.
Yes. Performance tests will come separately. This PR covers purely functional tests that verify arraycopies are not foobar-ing array contents, not hitting any asserts, or otherwise crash VMs. Performance tests would run on a limited set of inputs and in `release` bits, so they are bad for verification like this :)
> 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.
Yes, we can. Actually, working on #6622, I realized these test groups would be introduced anyway. So these new arraycopy tests should probably go to `hotspot_slow_compiler` group, along with other `stress` tests. This would hook arraycopy tests into `hotspot:tier3` automatically if #6622 lands. Tell me if you still want a completely separate test group, or `hotspot_slow_compiler` is enough for current Oracle testing infra.
> 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.
My original intent was to make sure the tests cross all small page sizes (up to 64K) and maybe even some large page sizes (1M `long[]` is 8M, so 2*4M). The size of this array does not matter for test performance very much, since we only allocate two `MAX_SIZE`-d arrays per entire run. Driver even caps the heap size at `-Xmx256m` to block tests from using too much memory. So, I'd leave it at 1M, if you agree.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6594
More information about the hotspot-compiler-dev
mailing list