RFR: 8243339: AArch64: Obsolete UseBarriersForVolatile option

Xiaohong Gong Xiaohong.Gong at arm.com
Fri May 8 03:38:34 UTC 2020


Hi,

Please  help to review this patch which obsoletes the product flag "-XX:UseBarrierssForVolatile" and its related code:
Webrev:
http://cr.openjdk.java.net/~xgong/rfr/8243339/webrev.00/
JBS:
https://bugs.openjdk.java.net/browse/JDK-8243339
https://bugs.openjdk.java.net/browse/JDK-8243456 (CSR)

As described in the CSR, using "-XX:+UseBarriersForVolatile" might have memory consistent issue like that mentioned
in [1]. It needs more effort to fix the issue and maintain the memory consistency in future. Since "ldar/stlr" has worked
well for a long time, and so does "ldaxr/stlxr" for unsafe atomics, we'd better simplify things by removing this option
and the alternative implementation for the volatile access.

Since its only one signifcant usage on a kind of CPU would also like to be removed (See [2]), it can work well without
this option. So we directly obsolete this option and remove the code, rather than deprecate it firstly.

Besides obsoleting this option, this patch also removes an AArch64 CPU feature "CPU_DMB_ATOMICS" together. It is
a  workaround while not an AArch64 official feature, which is not required anymore (See [2]).

[1] https://bugs.openjdk.java.net/browse/JDK-8241137
[2] https://bugs.openjdk.java.net/browse/JDK-8242469

Testing:
Jtreg hotspot::hotspot_all_no_apps, jdk::jdk_core, langtools::tier1
JCStress: tests-all

Thanks,
Xiaohong Gong




More information about the hotspot-compiler-dev mailing list