diff options
author | Duncan Coutts <duncan@well-typed.com> | 2011-06-01 19:48:15 +0100 |
---|---|---|
committer | Duncan Coutts <duncan@well-typed.com> | 2011-07-18 16:31:14 +0100 |
commit | fa8d20e6d85212290b633159b6ef2d77fb1c4021 (patch) | |
tree | 0dd7f7926d2c3a482e451a691f794fde2cae9a38 /rts/Stats.c | |
parent | 556557ebee2758acade603e25a8a16266dea791d (diff) | |
download | haskell-fa8d20e6d85212290b633159b6ef2d77fb1c4021.tar.gz |
Classify overflowed sparks separately
When you use `par` to make a spark, if the spark pool on the current
capability is full then the spark is discarded. This represents a
loss of potential parallelism and it also means there are simply a
lot of sparks around. Both are things that might be of concern to a
programmer when tuning a parallel program that uses par.
The "+RTS -s" stats command now reports overflowed sparks, e.g.
SPARKS: 100001 (15521 converted, 84480 overflowed, 0 dud, 0 GC'd, 0 fizzled)
Diffstat (limited to 'rts/Stats.c')
-rw-r--r-- | rts/Stats.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rts/Stats.c b/rts/Stats.c index 04b091cd3a..7c02b5a7d9 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -629,18 +629,19 @@ stat_exit(int alloc) { nat i; - SparkCounters sparks = { 0, 0, 0, 0, 0}; + SparkCounters sparks = { 0, 0, 0, 0, 0, 0}; for (i = 0; i < n_capabilities; i++) { sparks.created += capabilities[i].spark_stats.created; sparks.dud += capabilities[i].spark_stats.dud; + sparks.overflowed+= capabilities[i].spark_stats.overflowed; sparks.converted += capabilities[i].spark_stats.converted; sparks.gcd += capabilities[i].spark_stats.gcd; sparks.fizzled += capabilities[i].spark_stats.fizzled; } - statsPrintf(" SPARKS: %ld (%ld converted, %ld dud, %ld GC'd, %ld fizzled)\n\n", - sparks.created + sparks.dud, - sparks.converted, sparks.dud, + statsPrintf(" SPARKS: %ld (%ld converted, %ld overflowed, %ld dud, %ld GC'd, %ld fizzled)\n\n", + sparks.created + sparks.dud + sparks.overflowed, + sparks.converted, sparks.overflowed, sparks.dud, sparks.gcd, sparks.fizzled); } #endif |