X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FWeak.c;h=ef26e3b7ba93c1280cafc5cd7a62effcfa33c924;hb=9428b42b8e4b21493055b54f176cffa0a5b879b6;hp=1c03e69cdceea5f93d744e1f6051a03f0b72d278;hpb=bc5c802181b513216bc88f0d1ec9574157ee05fe;p=ghc-hetmet.git diff --git a/ghc/rts/Weak.c b/ghc/rts/Weak.c index 1c03e69..ef26e3b 100644 --- a/ghc/rts/Weak.c +++ b/ghc/rts/Weak.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Weak.c,v 1.18 2001/08/14 13:40:09 sewardj Exp $ + * $Id: Weak.c,v 1.20 2001/11/26 16:54:22 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -85,7 +85,17 @@ scheduleFinalizers(StgWeak *list) arr->payload[n] = w->finalizer; n++; } - w->header.info = &stg_DEAD_WEAK_info; + +#ifdef PROFILING + // A weak pointer is inherently used, so we do not need to call + // LDV_recordDead(). + // + // Furthermore, when PROFILING is turned on, dead weak + // pointers are exactly as large as weak pointers, so there is + // no need to fill the slop, either. See stg_DEAD_WEAK_info + // in StgMiscClosures.hc. +#endif + SET_HDR(w, &stg_DEAD_WEAK_info, w->header.prof.ccs); } t = createIOThread(RtsFlags.GcFlags.initialStkSize,