summaryrefslogtreecommitdiff
path: root/rts/Sparks.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-06-10 17:07:13 +0100
committerSimon Marlow <marlowsd@gmail.com>2016-06-14 16:24:56 +0100
commit23b73c97312e4d812812ed25a6396fff44d1da28 (patch)
tree8be2a28d1bc73d8c95fbcc5de96650daf7bcaf23 /rts/Sparks.c
parenta2deee068caa5b774adc62db4077e22fa0173ddc (diff)
downloadhaskell-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.c15
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++;