X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FGC.c;h=acb122fad6d336e34a37be9808f77428816aab58;hb=0d5d32bf62c39c390934d9ef4b01e2bf2db910f8;hp=22e3a9cd01570e2c7f751d43d767058d63e6ca06;hpb=80e3fcf33425c5bc9164694df2dec7c79730f076;p=ghc-hetmet.git diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 22e3a9c..acb122f 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.70 2000/01/14 13:17:15 hwloidl Exp $ + * $Id: GC.c,v 1.72 2000/01/22 18:00:03 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -933,7 +933,6 @@ isAlive(StgClosure *p) StgClosure * MarkRoot(StgClosure *root) { - //if (root != END_TSO_QUEUE) return evacuate(root); } @@ -1490,10 +1489,17 @@ loop: case TSO: { - StgTSO *tso = stgCast(StgTSO *,q); + StgTSO *tso = (StgTSO *)q; nat size = tso_sizeW(tso); int diff; + /* Deal with redirected TSOs (a TSO that's had its stack enlarged). + */ + if (tso->whatNext == ThreadRelocated) { + q = (StgClosure *)tso->link; + goto loop; + } + /* Large TSOs don't get moved, so no relocation is required. */ if (size >= LARGE_OBJECT_THRESHOLD/sizeof(W_)) { @@ -3337,20 +3343,20 @@ threadPaused(StgTSO *tso) threadLazyBlackHole(tso); } +/* ----------------------------------------------------------------------------- + * Debugging + * -------------------------------------------------------------------------- */ + #if DEBUG //@cindex printMutOnceList void printMutOnceList(generation *gen) { - StgMutClosure *p, *next, *new_list; + StgMutClosure *p, *next; p = gen->mut_once_list; - new_list = END_MUT_LIST; next = p->mut_link; - evac_gen = gen->no; - failed_to_evac = rtsFalse; - fprintf(stderr, "@@ Mut once list %p: ", gen->mut_once_list); for (; p != END_MUT_LIST; p = next, next = p->mut_link) { fprintf(stderr, "%p (%s), ", @@ -3368,12 +3374,9 @@ printMutableList(generation *gen) p = gen->saved_mut_list; next = p->mut_link; - evac_gen = 0; - failed_to_evac = rtsFalse; - fprintf(stderr, "@@ Mutable list %p: ", gen->saved_mut_list); for (; p != END_MUT_LIST; p = next, next = p->mut_link) { - fprintf(stderr, "%p (%s), ", + fprintf(stderr, "%p (%s), ", p, info_type((StgClosure *)p)); } fputc('\n', stderr);