Commit 52567e9d authored by Simon Marlow's avatar Simon Marlow

count fizzled and GC'd sparks separately

parent cc65b368
......@@ -227,7 +227,8 @@ initCapability( Capability *cap, nat i )
cap->sparks_created = 0;
cap->sparks_dud = 0;
cap->sparks_converted = 0;
cap->sparks_pruned = 0;
cap->sparks_gcd = 0;
cap->sparks_fizzled = 0;
#endif
cap->f.stgEagerBlackholeInfo = (W_)&__stg_EAGER_BLACKHOLE_info;
......
......@@ -101,7 +101,8 @@ struct Capability_ {
nat sparks_created;
nat sparks_dud;
nat sparks_converted;
nat sparks_pruned;
nat sparks_gcd;
nat sparks_fizzled;
#endif
// Per-capability STM-related data
......
......@@ -207,7 +207,7 @@ pruneSparkQueue (Capability *cap)
n++;
} else {
pruned_sparks++; // discard spark
cap->sparks_pruned++;
cap->sparks_fizzled++;
}
} else if (HEAP_ALLOCED(spark) &&
(Bdescr((P_)spark)->flags & BF_EVACUATED)) {
......@@ -217,11 +217,11 @@ pruneSparkQueue (Capability *cap)
n++;
} else {
pruned_sparks++; // discard spark
cap->sparks_pruned++;
cap->sparks_fizzled++;
}
} else {
pruned_sparks++; // discard spark
cap->sparks_pruned++;
cap->sparks_gcd++;
}
currInd++;
......
......@@ -638,16 +638,18 @@ stat_exit(int alloc)
lnat sparks_created = 0;
lnat sparks_dud = 0;
lnat sparks_converted = 0;
lnat sparks_pruned = 0;
lnat sparks_gcd = 0;
lnat sparks_fizzled = 0;
for (i = 0; i < n_capabilities; i++) {
sparks_created += capabilities[i].sparks_created;
sparks_dud += capabilities[i].sparks_dud;
sparks_converted += capabilities[i].sparks_converted;
sparks_pruned += capabilities[i].sparks_pruned;
sparks_gcd += capabilities[i].sparks_gcd;
sparks_fizzled += capabilities[i].sparks_fizzled;
}
statsPrintf(" SPARKS: %ld (%ld converted, %ld dud, %ld pruned)\n\n",
sparks_created + sparks_dud, sparks_converted, sparks_dud, sparks_pruned);
statsPrintf(" SPARKS: %ld (%ld converted, %ld dud, %ld GC'd, %ld fizzled)\n\n",
sparks_created + sparks_dud, sparks_converted, sparks_dud, sparks_gcd, sparks_fizzled);
}
#endif
......
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