X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FEvac.c;h=dda565967516acd91086bcdbdfae6399758ca241;hb=a60af39758448f92d8eaa3b62072f9adcdbbee9d;hp=9d1c4602ef8db079661a5157c0206fa1d31df69a;hpb=ab0e778ccfde61aed4c22679b24d175fc6cc9bf3;p=ghc-hetmet.git diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index 9d1c460..dda5659 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -4,6 +4,11 @@ * * Generational garbage collector: evacuation functions * + * Documentation on the architecture of the Garbage Collector can be + * found in the online commentary: + * + * http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC + * * ---------------------------------------------------------------------------*/ #include "Rts.h" @@ -287,9 +292,6 @@ evacuate_large(StgPtr p) REGPARM1 StgClosure * evacuate(StgClosure *q) { -#if defined(PAR) - StgClosure *to; -#endif bdescr *bd = NULL; step *stp; const StgInfoTable *info; @@ -544,9 +546,7 @@ loop: case RET_BCO: case RET_SMALL: - case RET_VEC_SMALL: case RET_BIG: - case RET_VEC_BIG: case RET_DYN: case UPDATE_FRAME: case STOP_FRAME: @@ -634,43 +634,6 @@ loop: } } -#if defined(PAR) - case RBH: - { - //StgInfoTable *rip = get_closure_info(q, &size, &ptrs, &nonptrs, &vhs, str); - to = copy(q,BLACKHOLE_sizeW(),stp); - //ToDo: derive size etc from reverted IP - //to = copy(q,size,stp); - debugTrace(DEBUG_gc, "evacuate: RBH %p (%s) to %p (%s)", - q, info_type(q), to, info_type(to)); - return to; - } - - case BLOCKED_FETCH: - ASSERT(sizeofW(StgBlockedFetch) >= MIN_PAYLOD_SIZE); - to = copy(q,sizeofW(StgBlockedFetch),stp); - debugTrace(DEBUG_gc, "evacuate: %p (%s) to %p (%s)", - q, info_type(q), to, info_type(to)); - return to; - -# ifdef DIST - case REMOTE_REF: -# endif - case FETCH_ME: - ASSERT(sizeofW(StgBlockedFetch) >= MIN_PAYLOAD_SIZE); - to = copy(q,sizeofW(StgFetchMe),stp); - debugTrace(DEBUG_gc, "evacuate: %p (%s) to %p (%s)", - q, info_type(q), to, info_type(to))); - return to; - - case FETCH_ME_BQ: - ASSERT(sizeofW(StgBlockedFetch) >= MIN_PAYLOAD_SIZE); - to = copy(q,sizeofW(StgFetchMeBlockingQueue),stp); - debugTrace(DEBUG_gc, "evacuate: %p (%s) to %p (%s)", - q, info_type(q), to, info_type(to))); - return to; -#endif - case TREC_HEADER: return copy(q,sizeofW(StgTRecHeader),stp); @@ -881,6 +844,14 @@ selector_loop: if (thunk_selector_depth >= MAX_THUNK_SELECTOR_DEPTH) { break; } + + // we don't update THUNK_SELECTORS in the compacted + // generation, because compaction does not remove the INDs + // that result, this causes confusion later. + if (Bdescr((P_)selectee)->flags && BF_COMPACTED) { + break; + } + thunk_selector_depth++; val = eval_thunk_selector(info->layout.selector_offset, @@ -927,15 +898,6 @@ selector_loop: case SE_CAF_BLACKHOLE: case SE_BLACKHOLE: case BLACKHOLE: -#if defined(PAR) - case RBH: - case BLOCKED_FETCH: -# ifdef DIST - case REMOTE_REF: -# endif - case FETCH_ME: - case FETCH_ME_BQ: -#endif // not evaluated yet break;