RFR: 8260473: [vector] ZGC: VectorReshape test produces incorrect results with ZGC enabled [v4]

王超 github.com+25214855+casparcwang at openjdk.java.net
Fri Jan 29 02:19:09 UTC 2021


On Thu, 28 Jan 2021 17:09:16 GMT, Stuart Monteith <smonteith at openjdk.org> wrote:

>> 王超 has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Change the directory & fix the include order
>
> test/hotspot/jtreg/compiler/vectorapi/VectorReshapeTest.java line 86:
> 
>> 84:         System.out.println("output: "+Arrays.toString(output));
>> 85:         // Assert.assertEquals(expected, output);
>> 86:         assert(expected.equals(output)); // SRDM
> 
> "SRDM" are my initials. You can remove this line and replace it with the uncommented line above.
> I was structuring this to work outwith the jtreg framework.

done

> test/hotspot/jtreg/compiler/vectorapi/VectorReshapeTest.java line 44:
> 
>> 42:  */
>> 43: 
>> 44: public class VectorReshapeTest {
> 
> This simply has this name as it is a cut-down version of test/jdk/jdk/incubator/vector/VectorReshapeTests.java
> The problem was originally intermittent, but was narrowed somewhat down to what we have here. Perhaps this could be renamed?

The test has changed to VectorRebracket128Test.java

> test/hotspot/jtreg/compiler/vectorapi/VectorReshapeTest.java line 40:
> 
>> 38:  * @modules jdk.incubator.vector
>> 39:  * @modules java.base/jdk.internal.vm.annotation
>> 40:  * @run main/othervm -XX:CompileCommand=compileonly,jdk/incubator/vector/ByteVector.fromByteBuffer
> 
> -XX:CompileCommand=compileonly,jdk/incubator/vector/ByteVector.fromByteBuffer restricts the compilation to a single method for diagnostic purposes. The test runs much quicker without it, and still reproduces the issue.

The test is changed to 'testng' mode, remove option compileonly will make the test pass the assert in jtreg test framework. But add the option will make it fail the assert.  So the option is left unchanged.

> test/hotspot/jtreg/compiler/vectorapi/VectorReshapeTest.java line 45:
> 
>> 43: 
>> 44: public class VectorReshapeTest {
>> 45:     static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations", 100);
> 
> The name "jdk.incubator.vector.test.loop-iterations" should probably be "jtreg.compiler.vectorapi.vectorreshapetest.loop-iterations".
> In addition, it should be reset to "1000" to ensure the test is compiled and executed with a chance of GCing to occur.

done

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

PR: https://git.openjdk.java.net/jdk/pull/2253


More information about the hotspot-compiler-dev mailing list