X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FCompact.c;h=1b57c53805b8bea41ac25ab8ece9c2186115b8aa;hb=70d6d8d57c4434bab0ce50515c5f5a063b588886;hp=eceaba40101a316d2c2f34d12dfe1c0100108ee8;hpb=329077220af83860d5dd6891649cb1058b5bbaa6;p=ghc-hetmet.git diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index eceaba4..1b57c53 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -14,6 +14,7 @@ #include "PosixSource.h" #include "Rts.h" +#include "GCThread.h" #include "Storage.h" #include "RtsUtils.h" #include "BlockAlloc.h" @@ -935,12 +936,14 @@ update_bkwd_compact( generation *gen ) void compact(StgClosure *static_objects) { - nat g, blocks; + nat n, g, blocks; generation *gen; // 1. thread the roots markCapabilities((evac_fn)thread_root, NULL); + markScheduler((evac_fn)thread_root, NULL); + // the weak pointer lists... if (weak_ptr_list != NULL) { thread((void *)&weak_ptr_list); @@ -953,7 +956,6 @@ compact(StgClosure *static_objects) for (g = 1; g < RtsFlags.GcFlags.generations; g++) { bdescr *bd; StgPtr p; - nat n; for (n = 0; n < n_capabilities; n++) { for (bd = capabilities[n].mut_lists[g]; bd != NULL; bd = bd->link) { @@ -1001,6 +1003,10 @@ compact(StgClosure *static_objects) debugTrace(DEBUG_gc, "update_fwd: %d", g); update_fwd(gen->blocks); + for (n = 0; n < n_capabilities; n++) { + update_fwd(gc_threads[n]->gens[g].todo_bd); + update_fwd(gc_threads[n]->gens[g].part_list); + } update_fwd_large(gen->scavenged_large_objects); if (g == RtsFlags.GcFlags.generations-1 && gen->old_blocks != NULL) { debugTrace(DEBUG_gc, "update_fwd: %d (compact)", g);