[aarch64-port-dev ] barrier use in JDK11
Dave Nuechterlein
dnuechte at amperecomputing.com
Thu Jun 14 17:59:57 UTC 2018
This is an example from JMH stub code. In jdk8, the ldrb is a ldarb because it is accessing the "isDone" volatile variable. Here is it a ldrb followed by a dmb inner, load. There is no dmb ish in the loop on jdk8 either.
0x0000ffff81a1d9dc: ldr x4, [sp,#112]
0x0000ffff81a1d9e0: add x0, x4, #0x1
;; membar
0x0000ffff81a1d9e4: dmb ish
0x0000ffff81a1d9e8: ldr x1, [sp,#120]
0x0000ffff81a1d9ec: ldrb w2, [x1,#148] ; implicit exception: dispatches to 0x0000ffff81a1dc64
0x0000ffff81a1d9f0: dmb ishld ;*getfield isDone {reexecute=0 rethrow=0 return_oop=0}
; - com.ampere.pipeline_int_mvn.generated.MyBenchmark_test_method_jmhTest::test_method_avgt_jmhStub at 27 (line 188)
I suspect the issue is that there are no customizations for xgene3/emag1 in cpu/aarch64/vm_version_aarch64.cpp.
Are there any guidelines or best practices on how to do an initial vm_version variant? What test should I run before submitting a patch, etc.
-----Original Message-----
From: Andrew Haley [mailto:aph at redhat.com]
Sent: Wednesday, June 13, 2018 11:59 AM
To: Dave Nuechterlein <dnuechte at amperecomputing.com>; aarch64-port-dev at openjdk.java.net
Subject: Re: [aarch64-port-dev ] barrier use in JDK11
On 06/13/2018 06:32 PM, Dave Nuechterlein wrote: I work for Ampere
> Computing, and am looking at the C2 code produced for some simple JMH
> benchmarks. The code produced from jdk11 seems to have many more DMBs
> than the jdk8u Aarch64 port. I think this is probably related to the
> controls for using barriers instead of LoadAcquire/StoreRelease for
> volatile variables. I want to switch the "use barriers for volatile
> variable switch", but I wanted to know more about why it is there, and
> what the pitfalls might be.
>
> Any suggestions/comments?
Hard to say. Please post an example; please make it the shortest one you can find. If the examples are too big, please put them on a web site somewhere.
It helps a lot to use a debug build.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list