RFR: 8260473: [vector] ZGC: VectorReshape test produces incorrect results with ZGC enabled [v4]
Stuart Monteith
smonteith at openjdk.java.net
Thu Jan 28 17:59:44 UTC 2021
On Thu, 28 Jan 2021 12:53:03 GMT, 王超 <github.com+25214855+casparcwang at openjdk.org> wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8260473
>>
>> Function "PhaseVector::expand_vunbox_node" creates a LoadNode, but forgets to make the LoadNode to pass gc barriers.
>>
>>
>> Testing: all Vector API related tests have passed.
>
> 王超 has updated the pull request incrementally with one additional commit since the last revision:
>
> Change the directory & fix the include order
Looks good, but needs some editing.
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.
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?
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.
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.
-------------
Changes requested by smonteith (Author).
PR: https://git.openjdk.java.net/jdk/pull/2253
More information about the hotspot-gc-dev
mailing list