[aarch64-port-dev ] RFR: 8243339: AArch64: Obsolete UseBarriersForVolatile option

Xiaohong Gong Xiaohong.Gong at arm.com
Thu May 21 10:24:44 UTC 2020


Hi Andrew,

> On 5/14/20 11:39 AM, Andrew Dinn wrote:
 > > On 14/05/2020 11:15, Andrew Haley wrote:
 > >> On 5/14/20 11:07 AM, Xiaohong Gong wrote:
 > >>> Hi Andrew,
 > >>>
 > >>> Thanks for having a look at it!
 > >>>
 > >>>  > On 5/14/20 10:37 AM, Andrew Haley wrote:
 > >>>  > > On 5/14/20 9:48 AM, Andrew Dinn wrote:
 > >>>  > >> Just for references a direct link to the webrev, issue
 > and CSR
 > >>> > are:
 > >>>  > >>
 > >>>  > >>   https://cr.openjdk.java.net/~xgong/rfr/8243339/webrev.00/
 > >>>  > >>   https://bugs.openjdk.java.net/browse/JDK-8243339
 > >>>  > >>   https://bugs.openjdk.java.net/browse/JDK-8243456
 > >>>  > >>
 > >>>  > >> The webrev looks fine to me. Nice work, thank you!
 > >>>  > >
 > >>>  > > There's a problem with C1: we generate unnecessary DMBs if
 >  > >
 > >>> we're using TieredStopAtLevel=1 or if we only have the client 
 > > >
 > >>> compiler. This is a performance regression, so I reject this  >
 > >
 > >>> patch.
 > >>>  >
 > >>>  > There are similar regressoins in the interpreter.
 > >>>
 > >>> Yes, I agree with you that regressions exist for interpreter
 > and
 > >>> client compiler.  So do you think if it's better to add the
 > >>> conditions to add DMBs for C1 and interpreter?  How about just
 > >>> excluding the scenario like "interpreter only", "client
 > compiler
 > >>> only" and "TieredStopAtLevel=1" ?
 > >>
 > >> Yes, I think so. Is there some way simply to ask the question
 > "Are we
 > >> using C2 or JVMCI compilers?" That's what we need to know.
 > > This can be done using build time conditionality.
 > 
 > Not entirely, because this is also switchable at runtime.

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.

Tests:
Tested jtreg hotspot::hotspot_all_no_apps,jdk::jdk_core,langtools::tier1 and
jcstress:tests-all, and all tests pass without new failure.
Besides the tests with default configuration, different compile modes (client mode,
c2 disabled mode) with different vm option groups (-XX:CompilationMode="quick-only",
-XX:-TieredCompilation, -XX:TieredStopAtLevel=1) are also tested.

Could you please take a look at it? Thank you!

Thanks,
Xiaohong




More information about the hotspot-compiler-dev mailing list