summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorDouglas Wilson <douglas.wilson@gmail.com>2017-11-21 18:05:22 -0500
committerBen Gamari <ben@smart-cactus.org>2017-11-21 21:11:05 -0500
commitf376ebac29d8dab023482a21ecfbc4dc032ab23e (patch)
treed79d09acad6b0c6dfb558f4d363de331da8751ca /rts/Stats.c
parent763ecacd3d4b0e9fcd4a8053a38722f89b488981 (diff)
downloadhaskell-f376ebac29d8dab023482a21ecfbc4dc032ab23e.tar.gz
rts: Fix inconsistencies in how retainer and heap censuses are timed.
mut_elapsed should deduct retainer profiling and heap censuses, just as mut_cpu does. mutator_cpu_ns should not deduct retainer profiling or heap censuses, since those times are included in stats.gc_cpu_ns. Reviewers: bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4185
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index 8f7865bfc0..fa85878621 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -633,7 +633,8 @@ stat_exit (void)
exit_elapsed = end_exit_elapsed - start_exit_elapsed - exit_gc_elapsed;
mut_elapsed = start_exit_elapsed - end_init_elapsed -
- (gc_elapsed - exit_gc_elapsed);
+ (gc_elapsed - exit_gc_elapsed) -
+ PROF_VAL(RPe_tot_time + HCe_tot_time);
mut_cpu = start_exit_cpu - end_init_cpu - (gc_cpu - exit_gc_cpu)
- PROF_VAL(RP_tot_time + HC_tot_time);
@@ -1010,8 +1011,7 @@ void getRTSStats( RTSStats *s )
s->cpu_ns = current_cpu - end_init_cpu;
s->elapsed_ns = current_elapsed - end_init_elapsed;
- s->mutator_cpu_ns = current_cpu - end_init_cpu - stats.gc_cpu_ns -
- PROF_VAL(RP_tot_time + HC_tot_time);
+ s->mutator_cpu_ns = current_cpu - end_init_cpu - stats.gc_cpu_ns;
s->mutator_elapsed_ns = current_elapsed - end_init_elapsed -
stats.gc_elapsed_ns;
}