X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FGC.c;h=5cd1298df7d7d4885e3278ed0e63fa431b12e0e3;hb=17a596022d01987d5ffe7db0742aa8db267b8cc3;hp=e0792d970d9104b4b3ca763c6d878e6c6e44bf0b;hpb=3e140bdf457f0c4c762ba344f396d84afef6d8f4;p=ghc-hetmet.git diff --git a/rts/sm/GC.c b/rts/sm/GC.c index e0792d9..5cd1298 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -268,8 +268,9 @@ GarbageCollect ( rtsBool force_major_gc ) memInventory(traceClass(DEBUG_gc)); #endif - // check stack sanity *before* GC (ToDo: check all threads) + // check stack sanity *before* GC IF_DEBUG(sanity, checkFreeListSanity()); + IF_DEBUG(sanity, checkMutableLists()); // Initialise all our gc_thread structures for (t = 0; t < n_gc_threads; t++) { @@ -334,7 +335,8 @@ GarbageCollect ( rtsBool force_major_gc ) // follow all the roots that the application knows about. gct->evac_step = 0; - markSomeCapabilities(mark_root, gct, gct->thread_index, n_gc_threads); + markSomeCapabilities(mark_root, gct, gct->thread_index, n_gc_threads, + rtsTrue/*prune sparks*/); #if defined(RTS_USER_SIGNALS) // mark the signal handlers (signals should be already blocked) @@ -381,9 +383,6 @@ GarbageCollect ( rtsBool force_major_gc ) // Update pointers from the Task list update_task_list(); - // Update pointers from capabilities (probably just the spark queues) - updateCapabilitiesPostGC(); - // Now see which stable names are still alive. gcStablePtrTable(); @@ -497,8 +496,6 @@ GarbageCollect ( rtsBool force_major_gc ) sweep(&oldest_gen->steps[0]); } - IF_DEBUG(sanity, checkGlobalTSOList(rtsFalse)); - /* run through all the generations/steps and tidy up */ copied = 0; @@ -1008,7 +1005,8 @@ gc_thread_work (void) // Every thread evacuates some roots. gct->evac_step = 0; - markSomeCapabilities(mark_root, gct, gct->thread_index, n_gc_threads); + markSomeCapabilities(mark_root, gct, gct->thread_index, n_gc_threads, + rtsTrue/*prune sparks*/); scavenge_until_all_done(); }