[aarch64-port-dev ] AArch64: Neoverse N1 atomic operations and -moutline-atomics

Nick Gasson nick.gasson at arm.com
Tue May 19 10:45:40 UTC 2020


On 05/18/20 17:53 PM, Andrew Haley wrote:
>
>> Question is whether it's best to enable this by default in OpenJDK or
>> leave it to downstream distributions to decide?
>
> I don't really understand why there is a conditional branch there.
> They could just do the test at startup and patch the code. Maybe it'd
> hurt DSO startup time or something? Maybe they don't like the idea of
> temporarily enabling exec privilege on a page of writable data.

I asked internally and it's basically the reasons you mention above,
plus patching could cause excessive copy-on-writes of the code pages.

The other way to do it is to build one libjvm.so without LSE support and
then a separate atomics/libjvm.so with -march set to enable the LSE
instructions. Then ld.so will load the appropriate library based on the
hwcaps. This should give the best performance but the build time and
package size balloons.

--
Nick


More information about the hotspot-dev mailing list