diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-07-20 15:25:58 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-07-20 16:23:29 +0100 |
commit | b44fd99fa0db169e215f8ad443ddb4fba1a79a4f (patch) | |
tree | f481405ce45a6c3a99c9a8a6bd5a5c23ba6a9d09 /rts/RetainerProfile.c | |
parent | c08bd1007db84e95618fc446b5b37bc052fa747c (diff) | |
download | haskell-b44fd99fa0db169e215f8ad443ddb4fba1a79a4f.tar.gz |
fix an assertion failure, and possibly some bogosity (see comment)
Diffstat (limited to 'rts/RetainerProfile.c')
-rw-r--r-- | rts/RetainerProfile.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index 4bfda6fef8..028b3e335a 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -1754,6 +1754,7 @@ retainRoot(void *user STG_UNUSED, StgClosure **tl) currentStackBoundary = stackTop; c = UNTAG_CLOSURE(*tl); + maybeInitRetainerSet(c); if (c != &stg_END_TSO_QUEUE_closure && isRetainer(c)) { retainClosure(c, c, getRetainerFrom(c)); } else { @@ -1856,6 +1857,15 @@ computeRetainerSet( void ) * However, this is not necessary because any static indirection objects * are just traversed through to reach dynamic objects. In other words, * they are not taken into consideration in computing retainer sets. + * + * SDM (20/7/2011): I don't think this is doing anything sensible, + * because it happens before retainerProfile() and at the beginning of + * retainerProfil() we change the sense of 'flip'. So all of the + * calls to maybeInitRetainerSet() here are initialising retainer sets + * with the wrong flip. Also, I don't see why this is necessary. I + * added a maybeInitRetainerSet() call to retainRoot(), and that seems + * to have fixed the assertion failure in retainerSetOf() I was + * encountering. * -------------------------------------------------------------------------- */ void resetStaticObjectForRetainerProfiling( StgClosure *static_objects ) |