Refactoring of the GC in preparation for parallel GC
authorSimon Marlow <simonmar@microsoft.com>
Wed, 31 Oct 2007 12:51:36 +0000 (12:51 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 31 Oct 2007 12:51:36 +0000 (12:51 +0000)
commitd5bd3e829c47c03157cf41cad581d2df44dfd81b
tree98fb99c2713190f77d1999345888b2dcdabe5bf2
parent9e5fe6be620eaf03a86f1321bef603ca43699a3c
Refactoring of the GC in preparation for parallel GC

This patch localises the state of the GC into a gc_thread structure,
and reorganises the inner loop of the GC to scavenge one block at a
time from global work lists in each "step".  The gc_thread structure
has a "workspace" for each step, in which it collects evacuated
objects until it has a full block to push out to the step's global
list.  Details of the algorithm will be on the wiki in due course.

At the moment, THREADED_RTS does not compile, but the single-threaded
GC works (and is 10-20% slower than before).
13 files changed:
includes/RtsFlags.h
includes/Storage.h
rts/Makefile
rts/RtsFlags.c
rts/sm/Evac.c
rts/sm/GC.c
rts/sm/GC.h
rts/sm/GCUtils.c
rts/sm/GCUtils.h
rts/sm/MarkWeak.c
rts/sm/Scav.c
rts/sm/Scav.h
rts/sm/Storage.c