[sgen] Only do fence when concurrent collection is running.
authorMark Probst <mark.probst@gmail.com>
Wed, 1 Jun 2016 23:37:28 +0000 (16:37 -0700)
committerMark Probst <mark.probst@gmail.com>
Mon, 25 Jul 2016 18:06:55 +0000 (11:06 -0700)
commit14bdaa017c807a008ae64308d2df2dffc9e768fc
tree6c827382c22b3b3c9fee53da1256ec50088e57d8
parentadc5b2b575c36a4bdf8fc311fc84fd820f15ee9c
[sgen] Only do fence when concurrent collection is running.

The store/store fence incurs quite a high cost, so we only want it to
run when absolutely necessary.  The most efficient way is to
separately compile nursery object operations for when the concurrent
collector is running, so there has to be no dynamic check.

In the future we might want to try batching updates of references to
moved objects so we have to do only one fence per batch.
mono/sgen/sgen-gc.c
mono/sgen/sgen-gc.h
mono/sgen/sgen-minor-copy-object.h
mono/sgen/sgen-minor-scan-object.h
mono/sgen/sgen-simple-nursery.c
mono/sgen/sgen-split-nursery.c