diff options
author | Simon Marlow <marlowsd@gmail.com> | 2016-06-10 17:07:13 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2016-06-14 16:24:56 +0100 |
commit | 23b73c97312e4d812812ed25a6396fff44d1da28 (patch) | |
tree | 8be2a28d1bc73d8c95fbcc5de96650daf7bcaf23 /rts/Sparks.c | |
parent | a2deee068caa5b774adc62db4077e22fa0173ddc (diff) | |
download | haskell-23b73c97312e4d812812ed25a6396fff44d1da28.tar.gz |
Don't GC sparks for CAFs
We can't tell whether the CAF is actually garbage or not.
Diffstat (limited to 'rts/Sparks.c')
-rw-r--r-- | rts/Sparks.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/rts/Sparks.c b/rts/Sparks.c index e0b2e66a7d..ecd3c38a17 100644 --- a/rts/Sparks.c +++ b/rts/Sparks.c @@ -211,15 +211,12 @@ pruneSparkQueue (Capability *cap) } } else { if (INFO_PTR_TO_STRUCT(info)->type == THUNK_STATIC) { - if (*THUNK_STATIC_LINK(spark) != NULL) { - elements[botInd] = spark; // keep entry (new address) - botInd++; - n++; - } else { - pruned_sparks++; // discard spark - cap->spark_stats.gcd++; - traceEventSparkGC(cap); - } + // We can't tell whether a THUNK_STATIC is garbage or not. + // See also Note [STATIC_LINK fields] + // isAlive() also ignores static closures (see GCAux.c) + elements[botInd] = spark; // keep entry (new address) + botInd++; + n++; } else { pruned_sparks++; // discard spark cap->spark_stats.fizzled++; |