diff options
Diffstat (limited to 'rts/RetainerProfile.c')
-rw-r--r-- | rts/RetainerProfile.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index 4e7ed3e222..dc21149d98 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -1672,6 +1672,7 @@ inner_loop: retainClosure(tso->bq, c, c_child_r); retainClosure(tso->trec, c, c_child_r); if ( tso->why_blocked == BlockedOnMVar + || tso->why_blocked == BlockedOnMVarRead || tso->why_blocked == BlockedOnBlackHole || tso->why_blocked == BlockedOnMsgThrowTo ) { @@ -1767,9 +1768,12 @@ computeRetainerSet( void ) // // The following code assumes that WEAK objects are considered to be roots // for retainer profilng. - for (weak = weak_ptr_list; weak != NULL; weak = weak->link) - // retainRoot((StgClosure *)weak); - retainRoot(NULL, (StgClosure **)&weak); + for (g = 0; g < RtsFlags.GcFlags.generations; g++) { + for (weak = generations[g].weak_ptr_list; weak != NULL; weak = weak->link) { + // retainRoot((StgClosure *)weak); + retainRoot(NULL, (StgClosure **)&weak); + } + } // Consider roots from the stable ptr table. markStableTables(retainRoot, NULL); |