diff options
-rw-r--r-- | rts/Capability.c | 1 | ||||
-rw-r--r-- | rts/Capability.h | 1 | ||||
-rw-r--r-- | rts/Sparks.c | 7 | ||||
-rw-r--r-- | rts/Stats.c | 6 |
4 files changed, 10 insertions, 5 deletions
diff --git a/rts/Capability.c b/rts/Capability.c index 345bd39c0f..9f7d1522a7 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -225,6 +225,7 @@ initCapability( Capability *cap, nat i ) cap->returning_tasks_tl = NULL; cap->inbox = (Message*)END_TSO_QUEUE; cap->sparks_created = 0; + cap->sparks_dud = 0; cap->sparks_converted = 0; cap->sparks_pruned = 0; #endif diff --git a/rts/Capability.h b/rts/Capability.h index a15ce15d88..e50dba3183 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -99,6 +99,7 @@ struct Capability_ { // Stats on spark creation/conversion nat sparks_created; + nat sparks_dud; nat sparks_converted; nat sparks_pruned; #endif diff --git a/rts/Sparks.c b/rts/Sparks.c index 7e2556d976..2498cb3dd0 100644 --- 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); - } - - cap->sparks_created++; + cap->sparks_created++; + } else { + cap->sparks_dud++; + } return 1; } diff --git a/rts/Stats.c b/rts/Stats.c index e519c940af..a507147fde 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -636,16 +636,18 @@ stat_exit(int alloc) { nat i; lnat sparks_created = 0; + lnat sparks_dud = 0; lnat sparks_converted = 0; lnat sparks_pruned = 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; } - statsPrintf(" SPARKS: %ld (%ld converted, %ld pruned)\n\n", - sparks_created, sparks_converted, sparks_pruned); + statsPrintf(" SPARKS: %ld (%ld converted, %ld dud, %ld pruned)\n\n", + sparks_created + sparks_dud, sparks_converted, sparks_dud, sparks_pruned); } #endif |