[aarch64-port-dev ] RFR: 8135018: AARCH64: Missing memory barriers for CMS collector
thomas.schatzl at oracle.com
Tue Sep 8 11:28:17 UTC 2015
On Thu, 2015-09-03 at 19:20 +0100, Andrew Haley wrote:
> 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.
looks good to me.
One minor change that may decrease overhead is to make these barriers
conditional on CMSPrecleaningEnabled - but then I do not know how much
impact that would have. The only web page I ever saw recommending to
disable precleaning is some workaround for some bug...
Not sure if you need a sponsor, but if so, I could do that.
More information about the hotspot-compiler-dev