[aarch64-port-dev ] [Roland Westrelin] Re: Aarch64 port for ZGC, so far

Stuart Monteith stuart.monteith at linaro.org
Thu Mar 7 11:36:07 UTC 2019

   I've put here the three patches required for ZGC on Aarch64:


In order of application they are:
 oop64-20190307/  - Which introduces the Use64BitLiteralAddresses
option, which make the generated code use 64-bit literals, rather than
48-bit literals.
 zgc-20190307/    - Which implements the missing code for implementing
ZGC on aarch64.
 roland-membar-20190307/   - Is a fix for handling memory barriers in
C2 by Roland Westerlin.

The zgc patch matches the x86 code pretty closely - since the last
round of reviews it has removed a lot of unnecessary code. There is
still some questionable code tagged "SRDM". Specficially the envvar
"SRDM_STORE_BREAK" can be set to generate a trap in the ZGC store
barrier., and the cache line size is assumed to be 64 bit, whereas
this can be a variable, etc.

The code has been updated to match the latest changes. However,
concurrent class unloading is currently unimplemented, and so is
disabled when ZGC is enabled.

There is an issue with C1 - the changes in "8217717: ZGC: Broken oop
map in C1 load barrier stub" did regress things somewhat causing
crashes with stale references. However, As patching on aarch64 C1
isn't really supported, I'm not satisfied it was working correctly
before. Patching lea may impractical as things stand today.

Passing -XX:+UseZGC doens't disable C1, so you'll need to also pass
-XX:-TieredCompilation , if you want to avoid the C1 problems. There
is code to make sure AOT/JVMCI is not enabled.

With SPECjbb2015 on my particular hardware, the results are broadly in
line with what was presented by Oracle on x86. With ZGC, critical-jOPS
is almost 80% of max-jOPS, On G1GC on my machine that figure is about
35%. The max-jOPS of both are within 2% of each other.


On Tue, 4 Dec 2018 at 09:13, Roland Westrelin <rwestrel at redhat.com> wrote:
> > Which two cas do you mean are the same?
> As I understand, with ZGC, Unsafe.compareAndSetReference() is compiled
> as a cas followed by a test for the result of the cas and on failure,
> ZGC barriers are applied and the cas is attempted again.
> Roland.

More information about the zgc-dev mailing list