diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-11-18 14:24:42 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-11-18 14:24:42 +0000 |
commit | d600bf7a6afdbfc4a22f9379406a9c6f789a4c2d (patch) | |
tree | fc86da89b8891374298c441d14d2333b33e29d53 /rts/ThreadPaused.c | |
parent | 0fa59deb44b8a1a0b44ee2b4cc4ae0db31dec038 (diff) | |
download | haskell-d600bf7a6afdbfc4a22f9379406a9c6f789a4c2d.tar.gz |
Add optional eager black-holing, with new flag -feager-blackholing
Eager blackholing can improve parallel performance by reducing the
chances that two threads perform the same computation. However, it
has a cost: one extra memory write per thunk entry.
To get the best results, any code which may be executed in parallel
should be compiled with eager blackholing turned on. But since
there's a cost for sequential code, we make it optional and turn it on
for the parallel package only. It might be a good idea to compile
applications (or modules) with parallel code in with
-feager-blackholing.
ToDo: document -feager-blackholing.
Diffstat (limited to 'rts/ThreadPaused.c')
-rw-r--r-- | rts/ThreadPaused.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rts/ThreadPaused.c b/rts/ThreadPaused.c index 5463deecb8..674d0d9ca3 100644 --- a/rts/ThreadPaused.c +++ b/rts/ThreadPaused.c @@ -250,9 +250,6 @@ threadPaused(Capability *cap, StgTSO *tso) } if (bh->header.info != &stg_CAF_BLACKHOLE_info) { -#if (!defined(LAZY_BLACKHOLING)) && defined(DEBUG) - debugBelch("Unexpected lazy BHing required at 0x%04lx\n",(long)bh); -#endif // zero out the slop so that the sanity checker can tell // where the next closure is. DEBUG_FILL_SLOP(bh); @@ -261,7 +258,7 @@ threadPaused(Capability *cap, StgTSO *tso) // We pretend that bh is now dead. LDV_recordDead_FILL_SLOP_DYNAMIC((StgClosure *)bh); #endif - + // an EAGER_BLACKHOLE gets turned into a BLACKHOLE here. #ifdef THREADED_RTS cur_bh_info = (const StgInfoTable *) cas((StgVolatilePtr)&bh->header.info, |