[commit: ghc] master: Also include basic time statistics in GCStats. (9213fc9)
Edward Z. Yang
ezyang at MIT.EDU
Sat Aug 6 19:26:29 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9213fc968a56fb671efc4d091ace236b18dec541
>---------------------------------------------------------------
commit 9213fc968a56fb671efc4d091ace236b18dec541
Author: Edward Z. Yang <ezyang at mit.edu>
Date: Sat Aug 6 11:18:36 2011 -0400
Also include basic time statistics in GCStats.
Signed-off-by: Edward Z. Yang <ezyang at mit.edu>
>---------------------------------------------------------------
includes/rts/storage/GC.h | 2 ++
rts/Stats.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index e57ffd2..e745b04 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 ebe239f..b3b0f80 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_);
}
More information about the Cvs-ghc
mailing list