[sgen] Preclean mod union entries before the finishing pause
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 19 Jan 2016 09:21:39 +0000 (11:21 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Fri, 25 Mar 2016 00:12:57 +0000 (02:12 +0200)
commitff9488f11f40ddb30b6295e0562d8f582a32ff7e
treedaff46b3e61efca93e5ee9661449c0bc7404bfb7
parent93bc7c02feed002b3a1866ff60e5b78929ac9eab
[sgen] Preclean mod union entries before the finishing pause

When the concurrent mark ends, we have another concurrent phase where we scan the cardtable trying to clean as many cards as possible. The way we achieve this is by first copying all the mod union cards (for each block/los_obj) to a separate temporary card_table. When scanning we will only scan these cards. Therefore we will first preclean these cards in the actual mod_union card_tables, followed by a full memory barrier (which assures us that, when scanning, we will observe the changes that led to the corresponding card marks) and then by a normal mod_union scan, which can remark some of these cards, without any races with the preclean phase.
mono/metadata/sgen-mono.c
mono/sgen/sgen-cardtable.c
mono/sgen/sgen-cardtable.h
mono/sgen/sgen-client.h
mono/sgen/sgen-gc.c
mono/sgen/sgen-gc.h
mono/sgen/sgen-los.c
mono/sgen/sgen-marksweep.c
mono/sgen/sgen-workers.c
mono/sgen/sgen-workers.h