From: simonmar Date: Wed, 12 Feb 2003 11:59:49 +0000 (+0000) Subject: [project @ 2003-02-12 11:59:49 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1177 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=87bfa396ca8cea3296e8a715766062dc4d2c1d9b;p=ghc-hetmet.git [project @ 2003-02-12 11:59:49 by simonmar] Fix two bugs/omissions in the new THUNK_SELECTOR code which cause biographical profiling to fall over. (aka rev. 1.135.4.10) --- diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 89a709d..6e6bd07 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.146 2002/12/11 15:36:42 simonmar Exp $ + * $Id: GC.c,v 1.147 2003/02/12 11:59:49 simonmar Exp $ * - * (c) The GHC Team 1998-2002 + * (c) The GHC Team 1998-2003 * * Generational garbage collector * @@ -2059,8 +2059,19 @@ selector_loop: // because we are guaranteed that p is in a generation // that we are collecting, and we never want to put the // indirection on a mutable list. +#ifdef PROFILING + // For the purposes of LDV profiling, we have destroyed + // the original selector thunk. + SET_INFO(p, info_ptr); + LDV_recordDead_FILL_SLOP_DYNAMIC(selectee); +#endif ((StgInd *)selectee)->indirectee = val; SET_INFO(selectee,&stg_IND_info); +#ifdef PROFILING + // For the purposes of LDV profiling, we have created an + // indirection. + LDV_recordCreate(selectee); +#endif selectee = val; goto selector_loop; }