From: simonmar Date: Tue, 27 Nov 2001 16:35:57 +0000 (+0000) Subject: [project @ 2001-11-27 16:35:57 by simonmar] X-Git-Tag: Approximately_9120_patches~501 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=68d65b1e8dbf8dedb0f620908ce05abc9db2e860;p=ghc-hetmet.git [project @ 2001-11-27 16:35:57 by simonmar] Fix thinko. Timing stats should add up properly again. --- diff --git a/ghc/rts/Stats.c b/ghc/rts/Stats.c index 4b26990..1991090 100644 --- a/ghc/rts/Stats.c +++ b/ghc/rts/Stats.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stats.c,v 1.39 2001/11/26 16:54:22 simonmar Exp $ + * $Id: Stats.c,v 1.40 2001/11/27 16:35:57 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -106,7 +106,7 @@ static TICK_TYPE HCe_start_time, HCe_tot_time = 0; // heap census prof elap ti #endif #ifdef PROFILING -#define PROF_VAL(x) x +#define PROF_VAL(x) (x) #else #define PROF_VAL(x) 0 #endif @@ -354,9 +354,10 @@ stat_startExit(void) { getTimes(); MutElapsedStamp = CurrentElapsedTime; - MutElapsedTime = CurrentElapsedTime - GCe_tot_time - InitElapsedStamp; + MutElapsedTime = CurrentElapsedTime - GCe_tot_time - + PROF_VAL(RPe_tot_time + HCe_tot_time) - InitElapsedStamp; if (MutElapsedTime < 0) { MutElapsedTime = 0; } /* sometimes -0.00 */ - + /* for SMP, we don't know the mutator time yet, we have to inspect * all the running threads to find out, and they haven't stopped * yet. So we just timestamp MutUserTime at this point so we can