RFR: 8326421: Add jtreg test for large arrayCopy disjoint case.

Emanuel Peter epeter at openjdk.org
Wed Mar 27 17:12:27 UTC 2024


On Thu, 22 Feb 2024 13:01:50 GMT, Swati Sharma <duke at openjdk.org> wrote:

> Hi All,
> 
> Added a new jtreg test case for large arrayCopy disjoint case. 
> This will test byte array copy operation for aligned and non aligned cases with array length greater than 2.5MB.
> 
> Please review and provide your feedback.
> 
> Thanks,
> Swati
> Intel

Thanks for writing this test, and validating the results!
I left a few suggestions for improvement.

test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjointLarge.java line 25:

> 23: 
> 24: package compiler.arraycopy;
> 25: import java.util.Random;

You don't seem to be using Random at all. But maybe you should ;)

test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjointLarge.java line 29:

> 27: /**
> 28:  * @test
> 29:  * @bug 8310159

Suggestion:

 * @bug 8326421

Was there a reason for the other bug number? I think usually we use the bug number of the issue where the test is added. I might be wrong.

test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjointLarge.java line 32:

> 30:  * @summary Test large arrayCopy.
> 31:  *
> 32:  * @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch compiler.arraycopy.TestArrayCopyDisjointLarge

Suggestion:

 * @run main/timeout=600 compiler.arraycopy.TestArrayCopyDisjointLarge

test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjointLarge.java line 82:

> 80:             testByte(lengths[i % lengths.length], 9, 0);
> 81:             testByte(lengths[i % lengths.length], 9, 9);
> 82:         }

Why not randomize the values a bit, rather than chosing from a few fixed ones? Or at least add some random values. This would give better coverage.

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

PR Review: https://git.openjdk.org/jdk/pull/17962#pullrequestreview-1963948224
PR Review Comment: https://git.openjdk.org/jdk/pull/17962#discussion_r1541513469
PR Review Comment: https://git.openjdk.org/jdk/pull/17962#discussion_r1541503189
PR Review Comment: https://git.openjdk.org/jdk/pull/17962#discussion_r1541503607
PR Review Comment: https://git.openjdk.org/jdk/pull/17962#discussion_r1541508187


More information about the hotspot-compiler-dev mailing list