[sgen] Generational mono g hashtable
authorVlad Brezae <brezaevlad@gmail.com>
Fri, 10 Feb 2017 19:02:35 +0000 (21:02 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 20 Feb 2017 12:24:23 +0000 (14:24 +0200)
commit779d417c8f950d9ca8bc25d857ae24af9542ca0e
treea3b73366a94c5f4a27237881b44d0b7c12e7f432
parentcb44ebe851692556ade61728c951712e825f3bf0
[sgen] Generational mono g hashtable

We mark cards when storing in hashtables. During minors, instead of scanning the entire tables, we only scan the sections for the dirty cards. In order to simplify the implementation we split into separate key/value tables.

To achieve this, instead of using an user descriptor for the hashtable structure, we directly register the tables and we create a new type of root descriptor for it to teach sgen how to find pointers in it. In addition to the precise scan of the root, which is done during majors, we also support a remset scan for it. We expect all roots registered as ROOT_TYPE_WBARRIER, to use this new descriptor (ROOT_DESC_VECTOR). In order for a root descriptor to be in the ROOT_TYPE_WBARRIER category, it has to have a defined remset scan mode.
13 files changed:
mono/metadata/boehm-gc.c
mono/metadata/mono-hash.c
mono/metadata/null-gc.c
mono/metadata/sgen-mono.c
mono/sgen/gc-internal-agnostic.h
mono/sgen/sgen-cardtable.c
mono/sgen/sgen-debug.c
mono/sgen/sgen-descriptor.c
mono/sgen/sgen-descriptor.h
mono/sgen/sgen-gc.c
mono/sgen/sgen-gc.h
mono/sgen/sgen-marksweep-drain-gray-stack.h
mono/sgen/sgen-marksweep.c