X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FCompact.c;h=eceaba40101a316d2c2f34d12dfe1c0100108ee8;hb=26f4bfc82f2b2359259578e9c54d476fc2de650f;hp=7eeb90f7cae664e754aa9c379a76f4f1e53b7af6;hpb=f4692220c7cbdadaa633f50eb2b30b59edb30183;p=ghc-hetmet.git diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index 7eeb90f..eceaba4 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -335,8 +335,9 @@ thread_stack(StgPtr p, StgPtr stack_end) case CATCH_STM_FRAME: case ATOMICALLY_FRAME: case UPDATE_FRAME: - case STOP_FRAME: - case CATCH_FRAME: + case UNDERFLOW_FRAME: + case STOP_FRAME: + case CATCH_FRAME: case RET_SMALL: bitmap = BITMAP_BITS(info->i.layout.bitmap); size = BITMAP_SIZE(info->i.layout.bitmap); @@ -476,11 +477,12 @@ thread_TSO (StgTSO *tso) thread_(&tso->block_info.closure); } thread_(&tso->blocked_exceptions); + thread_(&tso->bq); thread_(&tso->trec); - thread_stack(tso->sp, &(tso->stack[tso->stack_size])); - return (StgPtr)tso + tso_sizeW(tso); + thread_(&tso->stackobj); + return (StgPtr)tso + sizeofW(StgTSO); } @@ -520,9 +522,12 @@ update_fwd_large( bdescr *bd ) continue; } - case TSO: - thread_TSO((StgTSO *)p); - continue; + case STACK: + { + StgStack *stack = (StgStack*)p; + thread_stack(stack->sp, stack->stack + stack->stack_size); + continue; + } case AP_STACK: thread_AP_STACK((StgAP_STACK *)p); @@ -664,8 +669,6 @@ thread_obj (StgInfoTable *info, StgPtr p) case IND: case IND_PERM: - case IND_OLDGEN: - case IND_OLDGEN_PERM: thread(&((StgInd *)p)->indirectee); return p + sizeofW(StgInd); @@ -707,6 +710,13 @@ thread_obj (StgInfoTable *info, StgPtr p) case TSO: return thread_TSO((StgTSO *)p); + case STACK: + { + StgStack *stack = (StgStack*)p; + thread_stack(stack->sp, stack->stack + stack->stack_size); + return p + stack_sizeW(stack); + } + case TREC_CHUNK: { StgWord i; @@ -900,8 +910,8 @@ update_bkwd_compact( generation *gen ) } // relocate TSOs - if (info->type == TSO) { - move_TSO((StgTSO *)p, (StgTSO *)free); + if (info->type == STACK) { + move_STACK((StgStack *)p, (StgStack *)free); } free += size; @@ -944,11 +954,6 @@ compact(StgClosure *static_objects) bdescr *bd; StgPtr p; nat n; - for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) { - for (p = bd->start; p < bd->free; p++) { - thread((StgClosure **)p); - } - } for (n = 0; n < n_capabilities; n++) { for (bd = capabilities[n].mut_lists[g]; bd != NULL; bd = bd->link) {