diff options
author | Takano Akio <aljee@hyper.cx> | 2013-03-11 18:51:05 +0900 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-06-15 16:41:02 +0100 |
commit | fe652a8b56c864167ecf1fac899bb3d99363dfcf (patch) | |
tree | 888acad55c4cc1a9eee790f0c5404feed34c5fec /rts/RetainerProfile.c | |
parent | 6770663f764db76dbb7138ccb3aea0527d194151 (diff) | |
download | haskell-fe652a8b56c864167ecf1fac899bb3d99363dfcf.tar.gz |
Maintain per-generation lists of weak pointers (#7847)
Diffstat (limited to 'rts/RetainerProfile.c')
-rw-r--r-- | rts/RetainerProfile.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index 4e7ed3e222..10a947dda8 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -1767,9 +1767,11 @@ 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); |