X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FStorage.h;h=9c9b2702a18e7fcbd492b6d4809d500377889b60;hb=dcdc09987d65e773d72a7a131421a297eb347d80;hp=b4a22b98f3b933203e4365e08503b90a94633fd2;hpb=bf739c105b606764ae81a437f3cd9893c977db2f;p=ghc-hetmet.git diff --git a/ghc/rts/Storage.h b/ghc/rts/Storage.h index b4a22b9..9c9b270 100644 --- a/ghc/rts/Storage.h +++ b/ghc/rts/Storage.h @@ -1,5 +1,7 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.h,v 1.6 1999/02/02 14:21:34 simonm Exp $ + * $Id: Storage.h,v 1.8 1999/03/18 17:57:23 simonm Exp $ + * + * (c) The GHC Team, 1998-1999 * * External Storage Manger Interface * @@ -136,6 +138,27 @@ updateWithIndirection(StgClosure *p1, StgClosure *p2) } } +#ifdef PROFILING +static inline void +updateWithPermIndirection(StgClosure *p1, StgClosure *p2) +{ + bdescr *bd; + + bd = Bdescr((P_)p1); + if (bd->gen->no == 0) { + SET_INFO(p1,&IND_PERM_info); + ((StgInd *)p1)->indirectee = p2; + TICK_UPD_NEW_IND(); + } else { + SET_INFO(p1,&IND_OLDGEN_PERM_info); + ((StgIndOldGen *)p1)->indirectee = p2; + ((StgIndOldGen *)p1)->mut_link = bd->gen->mut_once_list; + bd->gen->mut_once_list = (StgMutClosure *)p1; + TICK_UPD_OLD_IND(); + } +} +#endif + /* ----------------------------------------------------------------------------- The CAF list - used to let us revert CAFs