[commit: ghc] master: rts: Fix inconsistencies in how retainer and heap censuses are timed. (f376eba)

git at git.haskell.org git at git.haskell.org
Wed Nov 22 02:11:41 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f376ebac29d8dab023482a21ecfbc4dc032ab23e/ghc

>---------------------------------------------------------------

commit f376ebac29d8dab023482a21ecfbc4dc032ab23e
Author: Douglas Wilson <douglas.wilson at gmail.com>
Date:   Tue Nov 21 18:05:22 2017 -0500

    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


>---------------------------------------------------------------

f376ebac29d8dab023482a21ecfbc4dc032ab23e
 rts/Stats.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rts/Stats.c b/rts/Stats.c
index 8f7865b..fa85878 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;
 }



More information about the ghc-commits mailing list