[sgen] Inline card table wbarrier with nursery check.
authorMark Probst <mark.probst@gmail.com>
Sat, 21 Aug 2010 18:36:29 +0000 (20:36 +0200)
committerMark Probst <mark.probst@gmail.com>
Wed, 25 Aug 2010 08:47:24 +0000 (10:47 +0200)
commitefe4cb4270b4ae1a81e6c398faba4c23b1c2dd2b
tree325bccb56ce7ca77f7273a76692ebfaa8b21b05d
parent2d69022c2be4dfd11cc431940c3960378b2a932b
[sgen] Inline card table wbarrier with nursery check.

Our previous inline card table write barrier did not perform
any checks on the pointers, which means that it marked cards
for the major heap even if the references stored there were
not to nursery objects.  Doing that is slightly faster in the
mutator but the nursery collections might take a lot longer
because objects might have to scanned unnecessarily.

This patch implements an inline write barrier that also
performs a nursery check.  To that end we introduce a new
IL opcode, OP_CARD_TABLE_WBARRIER.

It is currently only implemented on x86.  For architectures
that don't support it (yet), we automatically regress to the
old, non-checking write barrier.
mono/metadata/gc-internal.h
mono/metadata/sgen-gc.c
mono/mini/cpu-x86.md
mono/mini/method-to-ir.c
mono/mini/mini-ops.h
mono/mini/mini-x86.c
mono/mini/mini-x86.h