[commit: ghc] master: Don't GC sparks for CAFs (23b73c9)
git at git.haskell.org
git at git.haskell.org
Tue Jun 14 15:21:14 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/23b73c97312e4d812812ed25a6396fff44d1da28/ghc
>---------------------------------------------------------------
commit 23b73c97312e4d812812ed25a6396fff44d1da28
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Jun 10 17:07:13 2016 +0100
Don't GC sparks for CAFs
We can't tell whether the CAF is actually garbage or not.
>---------------------------------------------------------------
23b73c97312e4d812812ed25a6396fff44d1da28
rts/Sparks.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/rts/Sparks.c b/rts/Sparks.c
index e0b2e66..ecd3c38 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++;
More information about the ghc-commits
mailing list