diff options
author | simonmar <unknown> | 2005-02-28 17:01:23 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-02-28 17:01:23 +0000 |
commit | 6d194f48d7313fa8daa004b7b3e3a55ffa52f4a9 (patch) | |
tree | 66a632ae47fba6211f872d89f1b85febbf9ad578 /ghc/rts/GC.c | |
parent | a84285247bfb162fdefc3fcb8be88c34c1f5cd35 (diff) | |
download | haskell-6d194f48d7313fa8daa004b7b3e3a55ffa52f4a9.tar.gz |
[project @ 2005-02-28 17:01:13 by simonmar]
Optimisation: the update code only needs to check whether the closure
being updated is a BLACKHOLE_BQ if it has been blackholed; which is
only the case after lazy blackholing has taken place.
So to avoid this unnecessary cost, we have two kinds of update frame:
one which checks for BLACKHOLE_BQ and one that doesn't, and the lazy
blackholing algorithm converts the latter kind into the former as it
replaces thunks with blackholes.
Diffstat (limited to 'ghc/rts/GC.c')
-rw-r--r-- | ghc/rts/GC.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index a470f32c08..75f11a291d 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -4121,6 +4121,11 @@ threadSqueezeStack(StgTSO *tso) // Todo: maybe use SET_HDR() and remove LDV_RECORD_CREATE()? SET_INFO(bh,&stg_BLACKHOLE_info); + // Set the update frame to stg_bh_upd_info, which + // checks for blackholes (the normal update frame + // doesn't check, for efficiency). + ((StgClosure *)frame)->header.info = &stg_bh_upd_frame_info; + // We pretend that bh has just been created. LDV_RECORD_CREATE(bh); } |