projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix type checker error message
[ghc-hetmet.git]
/
rts
/
Sparks.c
diff --git
a/rts/Sparks.c
b/rts/Sparks.c
index
3911ae9
..
8579212
100644
(file)
--- a/
rts/Sparks.c
+++ b/
rts/Sparks.c
@@
-71,9
+71,10
@@
newSpark (StgRegTable *reg, StgClosure *p)
if (closure_SHOULD_SPARK(p)) {
pushWSDeque(pool,p);
if (closure_SHOULD_SPARK(p)) {
pushWSDeque(pool,p);
- }
-
- cap->sparks_created++;
+ cap->sparks_created++;
+ } else {
+ cap->sparks_dud++;
+ }
return 1;
}
return 1;
}
@@
-112,7
+113,7
@@
tryStealSpark (Capability *cap)
* -------------------------------------------------------------------------- */
void
* -------------------------------------------------------------------------- */
void
-pruneSparkQueue (evac_fn evac, void *user, Capability *cap)
+pruneSparkQueue (Capability *cap)
{
SparkPool *pool;
StgClosurePtr spark, tmp, *elements;
{
SparkPool *pool;
StgClosurePtr spark, tmp, *elements;
@@
-206,19
+207,23
@@
pruneSparkQueue (evac_fn evac, void *user, Capability *cap)
n++;
} else {
pruned_sparks++; // discard spark
n++;
} else {
pruned_sparks++; // discard spark
- cap->sparks_pruned++;
+ cap->sparks_fizzled++;
}
}
- } else {
- if (!(closure_flags[INFO_PTR_TO_STRUCT(info)->type] & _NS)) {
+ } else if (HEAP_ALLOCED(spark) &&
+ (Bdescr((P_)spark)->flags & BF_EVACUATED)) {
+ if (closure_SHOULD_SPARK(spark)) {
elements[botInd] = spark; // keep entry (new address)
elements[botInd] = spark; // keep entry (new address)
- evac (user, &elements[botInd]);
botInd++;
n++;
} else {
pruned_sparks++; // discard spark
botInd++;
n++;
} else {
pruned_sparks++; // discard spark
- cap->sparks_pruned++;
+ cap->sparks_fizzled++;
}
}
+ } else {
+ pruned_sparks++; // discard spark
+ cap->sparks_gcd++;
}
}
+
currInd++;
// in the loop, we may reach the bounds, and instantly wrap around
currInd++;
// in the loop, we may reach the bounds, and instantly wrap around