[aarch64-port-dev ] RFR: 8243339: AArch64: Obsolete UseBarriersForVolatile option
Ningsheng Jian
ningsheng.jian at arm.com
Wed May 27 07:21:01 UTC 2020
I see CSR review and submit tests are clear, so I pushed.
Thanks,
Ningsheng
On 5/22/20 10:36 AM, Xiaohong Gong wrote:
> Hi Andrew,
>
>> On 5/21/20 11:24 AM, Xiaohong Gong wrote:
> > > I'v created a new patch to add the condition when inserting
> > "DMBs"
> > > before volatile load for C1/Interpreter.
> > > The updated webrev:
> > > http://cr.openjdk.java.net/~xgong/rfr/8243339/webrev.01/
> > >
> > > It adds a new function "is_c1_or_interpreter_only()" , which can
> > > decide whether C2/JVMCI is used. Besides, since AOT also uses
> > Graal
> > > compiler as the codegen, it always return false if AOT mode is
> > enabled.
> >
> > Looks good to me, thanks.
> >
> > As far as I remember, Graal does optimize volatile accesses to use
> > ldar/stlr, or at least it will do so in the future, so if we're
> > using AOT or JVMCI the safe thing to do is add the DMBs.
>
> Yes, exactly! It has a patch in Graal github to do this optimization (https://github.com/oracle/graal/pull/1772).
>
> Thanks,
> Xiaohong
>
> -----Original Message-----
> From: Andrew Haley <aph at redhat.com>
> Sent: Thursday, May 21, 2020 10:06 PM
> To: Xiaohong Gong <Xiaohong.Gong at arm.com>; Andrew Dinn <adinn at redhat.com>; Derek White <derekw at marvell.com>; aarch64-port-dev at openjdk.java.net; hotspot-compiler-dev at openjdk.java.net
> Cc: nd <nd at arm.com>
> Subject: Re: [aarch64-port-dev ] RFR: 8243339: AArch64: Obsolete UseBarriersForVolatile option
>
> On 5/21/20 11:24 AM, Xiaohong Gong wrote:
>> I'v created a new patch to add the condition when inserting "DMBs"
>> before volatile load for C1/Interpreter.
>> The updated webrev:
>> http://cr.openjdk.java.net/~xgong/rfr/8243339/webrev.01/
>>
>> It adds a new function "is_c1_or_interpreter_only()" , which can
>> decide whether C2/JVMCI is used. Besides, since AOT also uses Graal
>> compiler as the codegen, it always return false if AOT mode is enabled.
>
> Looks good to me, thanks.
>
> As far as I remember, Graal does optimize volatile accesses to use ldar/stlr, or at least it will do so in the future, so if we're using AOT or JVMCI the safe thing to do is add the DMBs.
>
> --
> Andrew Haley (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>
More information about the hotspot-compiler-dev
mailing list