RFR: (T) AArch64: compiler/c2/aarch64/TestVolatilesG1.java fails with "Missing expected output membar_volatile..."

Andrew Dinn adinn at redhat.com
Fri Nov 29 16:12:14 UTC 2019


On 29/11/2019 15:56, Andrew Haley wrote:
> On 11/29/19 3:48 PM, Andrew Dinn wrote:
>> JIRA:   https://bugs.openjdk.java.net/browse/JDK-8225776
>> webrev: http://cr.openjdk.java.net/~adinn/8232828/webrev.00
>>
>> The test parses compiler AArch64 PrintAssembly output foir a variety of
>> volatile read, write and CAS operations to check that membars are added
>> or omitted appropriately when using, respectively, acquire/release
>> accesses vs unordered accesses supplemented with barriers. n.b. the test
>> only runs on a debug build JVM.
> 
> Cool, thanks. The endless game of whack-a-mole. :-)
> 
> Trouble is, there are many possible correct sequences. Still, we can't
> check for them all without making this test AI-complete!
There are in general many correct sequences for all programs. In this
case we have a very straightforward program so there is no room for
variation in the generated code -- modulo code inline/out of line
scheduling fixes like 8232828, that is.

So, although this test in no way guarantees that every volatile/CAS wil
have the correct sequence of generated/elided barriers it will reliably
check that the barrier elision/generation has not been messed up
wholesale (the more logically minded readers will already have
marshalled their quantifiers and negation operators accordingly).

Anyway, I'll take your 'cool, thanks' as a confirmation that this is
indeed trivial and also as a license to push.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill



More information about the hotspot-compiler-dev mailing list