Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d0226ebc4419caba120e6a586b65490d3fb2fd0f >--------------------------------------------------------------- commit d0226ebc4419caba120e6a586b65490d3fb2fd0f Author: Simon Marlow <[email protected]> Date: Wed Oct 12 15:38:09 2011 +0100 fix for a deadlock when using +RTS -hb with -prof -threaded >--------------------------------------------------------------- rts/sm/GC.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 2252cfc..b97ff12 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -407,8 +407,11 @@ GarbageCollect (rtsBool force_major_gc, // We call processHeapClosureForDead() on every closure destroyed during // the current garbage collection, so we invoke LdvCensusForDead(). if (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_LDV - || RtsFlags.ProfFlags.bioSelector != NULL) - LdvCensusForDead(N); + || RtsFlags.ProfFlags.bioSelector != NULL) { + RELEASE_SM_LOCK; // LdvCensusForDead may need to take the lock + LdvCensusForDead(N); + ACQUIRE_SM_LOCK; + } #endif // NO MORE EVACUATION AFTER THIS POINT! _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
