[aarch64-port-dev ] Question about JVM option "-XX:+UseBarriersForVolatile" usage in aarch64.

Nick Gasson nick.gasson at arm.com
Mon Mar 30 10:13:51 UTC 2020


On 03/30/20 17:55 pm, Andrew Haley wrote:
>
> There is no usage of "-XX:+UseBarriersForVolatile" in real applications.
> Any flags of this kind are dangerous because they tend to break over time
> because they are not tested.
>
> I was thinking we could make this a diagnostic-only flag, but perhaps it
> should be removed altogether. Patches welcome.

There is this one use in vm_version_aarch64.cpp:

  if (FLAG_IS_DEFAULT(UseBarriersForVolatile)) {
    UseBarriersForVolatile = (_features & CPU_DMB_ATOMICS) != 0;
  }

CPU_DMB_ATOMICS is set for one particular variant of one vendor's
CPU. It came from "8079203: aarch64: need to cater for different partner
implementations". But I can't find any explanation as to why it's
required. Any ideas? CPU errata?

http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2015-May/002315.html


Thanks,
Nick


More information about the aarch64-port-dev mailing list