summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-01-06 11:31:31 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-01-06 11:31:35 +0000
commit847cde736c8ae255e9a59ed2e69b5f1bb1f7b4c4 (patch)
treec1420cbd677b75a19729692ed34af8359d373764 /rts/Stats.c
parenta6969bf9236eb0497afbf3a27da2fe07e8e9175b (diff)
downloadhaskell-847cde736c8ae255e9a59ed2e69b5f1bb1f7b4c4.tar.gz
refactoring
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index 61f31f1551..43a776053e 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -566,7 +566,8 @@ stat_exit(int alloc)
// included in the GC stats. We therefore subtract them to
// obtain the actual GC cpu time. XXX: we aren't doing this
// for elapsed time.
- gc_cpu -= 0 + PROF_VAL(RP_tot_time + HC_tot_time);
+ gc_cpu -= 0 + PROF_VAL(RP_tot_time + HC_tot_time);
+ gc_elapsed -= 0 + PROF_VAL(RPe_tot_time + HCe_tot_time);
init_cpu = get_init_cpu();
init_elapsed = get_init_elapsed();
@@ -691,24 +692,23 @@ stat_exit(int alloc)
TimeToSecondsDbl(gc_elapsed)*100/TimeToSecondsDbl(tot_elapsed));
#endif
- if (tot_cpu - GC_tot_cpu - PROF_VAL(RP_tot_time + HC_tot_time) == 0)
+ if (mut_cpu == 0) {
showStgWord64(0, temp, rtsTrue/*commas*/);
- else
+ } else {
showStgWord64(
- (StgWord64)((GC_tot_alloc*sizeof(W_))/
- TimeToSecondsDbl(tot_cpu - GC_tot_cpu -
- PROF_VAL(RP_tot_time + HC_tot_time))),
- temp, rtsTrue/*commas*/);
-
+ (StgWord64)((GC_tot_alloc*sizeof(W_)) / TimeToSecondsDbl(mut_cpu)),
+ temp, rtsTrue/*commas*/);
+ }
+
statsPrintf(" Alloc rate %s bytes per MUT second\n\n", temp);
statsPrintf(" Productivity %5.1f%% of total user, %.1f%% of total elapsed\n\n",
- TimeToSecondsDbl(tot_cpu - GC_tot_cpu -
+ TimeToSecondsDbl(tot_cpu - gc_cpu -
PROF_VAL(RP_tot_time + HC_tot_time) - init_cpu) * 100
/ TimeToSecondsDbl(tot_cpu),
- TimeToSecondsDbl(tot_cpu - GC_tot_cpu -
- PROF_VAL(RP_tot_time + HC_tot_time) - init_cpu) * 100
- / TimeToSecondsDbl(tot_elapsed));
+ TimeToSecondsDbl(tot_cpu - gc_cpu -
+ PROF_VAL(RP_tot_time + HC_tot_time) - init_cpu) * 100
+ / TimeToSecondsDbl(tot_elapsed));
/*
TICK_PRINT(1);