Commit 17bfe098 authored by Simon Marlow's avatar Simon Marlow
Browse files

pruneSparkQueue: handle CAFs

parent 4a2a508b
......@@ -219,19 +219,34 @@ pruneSparkQueue (Capability *cap)
pruned_sparks++; // discard spark
cap->sparks_fizzled++;
}
} else if (HEAP_ALLOCED(spark) &&
(Bdescr((P_)spark)->flags & BF_EVACUATED)) {
if (closure_SHOULD_SPARK(spark)) {
elements[botInd] = spark; // keep entry (new address)
botInd++;
n++;
} else if (HEAP_ALLOCED(spark)) {
if ((Bdescr((P_)spark)->flags & BF_EVACUATED)) {
if (closure_SHOULD_SPARK(spark)) {
elements[botInd] = spark; // keep entry (new address)
botInd++;
n++;
} else {
pruned_sparks++; // discard spark
cap->sparks_fizzled++;
}
} else {
pruned_sparks++; // discard spark
cap->sparks_fizzled++;
cap->sparks_gcd++;
}
} else {
pruned_sparks++; // discard spark
cap->sparks_gcd++;
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->sparks_gcd++;
}
} else {
pruned_sparks++; // discard spark
cap->sparks_fizzled++;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment