Commit f376ebac authored by duog's avatar duog Committed by Ben Gamari

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
parent 763ecacd
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment