summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2011-08-06 11:18:36 -0400
committerEdward Z. Yang <ezyang@mit.edu>2011-08-06 13:24:52 -0400
commit9213fc968a56fb671efc4d091ace236b18dec541 (patch)
tree6d67bbd00b3adbebb00dbd86cef641fdb8cb56b8
parente17c1568baf142c2d2ddca4a4b4a7ba5a4ceddca (diff)
downloadhaskell-9213fc968a56fb671efc4d091ace236b18dec541.tar.gz
Also include basic time statistics in GCStats.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
-rw-r--r--includes/rts/storage/GC.h2
-rw-r--r--rts/Stats.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index e57ffd23cf..e745b0460b 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -198,6 +198,8 @@ typedef struct _GCStats {
StgDouble mutator_wall_seconds;
StgDouble gc_cpu_seconds;
StgDouble gc_wall_seconds;
+ StgDouble cpu_seconds;
+ StgDouble wall_seconds;
} GCStats;
void getGCStats (GCStats *s);
diff --git a/rts/Stats.c b/rts/Stats.c
index ebe239f06e..b3b0f804d6 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -891,6 +891,9 @@ extern void getGCStats( GCStats *s )
s->mutator_wall_seconds = TICK_TO_DBL(current_elapsed- end_init_elapsed - gc_elapsed);
s->gc_cpu_seconds = TICK_TO_DBL(gc_cpu);
s->gc_wall_seconds = TICK_TO_DBL(gc_elapsed);
+ /* EZY: Being consistent with incremental output, but maybe should also discount init */
+ s->cpu_seconds = TICK_TO_DBL(current_cpu);
+ s->wall_seconds = TICK_TO_DBL(current_elapsed - end_init_elapsed);
s->par_avg_bytes_copied = GC_par_avg_copied*(StgWord64)sizeof(W_);
s->par_max_bytes_copied = GC_par_max_copied*(StgWord64)sizeof(W_);
}