[aarch64-port-dev ] RFR: 8135018: AARCH64: Missing memory barriers for CMS collector

Andrew Haley aph at redhat.com
Thu Sep 3 18:20:42 UTC 2015

C2 has StoreStore barriers in the right place for CMS, but C1 does not
and neither does the interpreter.  (We need the barriers because
otherwise the concurrent GC thread might see a card mark with a stale
null pointer in a field and so not mark a live object.)

This patch adds them where needed.  Note that the patch for C1 adds
the StoreStore barrier in generic code with no ifdef AARCH64.  My
reasoning is this: TSO platforms will emit no instructions for
StoreStore; non-TSO platforms need the StoreStore for correctness.  I
could #ifdef AARCH64 the code, but it is harmless in TSO and fixes a
bug in non-TSO.



More information about the hotspot-compiler-dev mailing list