diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-26 15:19:06 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-26 15:19:06 +0000 |
commit | 9a35b648d4858ac68c39a985b4fcb38649b3b337 (patch) | |
tree | 6424ff69f6fae47ba0b6239a1c29e1973c0dafc6 /gcc/timevar.c | |
parent | b74a19516b85ecb4930a5f84a620df71c3d4da5f (diff) | |
download | gcc-9a35b648d4858ac68c39a985b4fcb38649b3b337.tar.gz |
* flags.h (time_report): Remove.
* timevar.c (timevar_enable): New.
(TIMEVAR_ENABLE): Remove, use timevar_enable.
(timevar_init): Rename from init_timevar.
* timevar.h (timevar_init): Rename from init_timevar.
* toplev.c (time_report): Make static.
(do_compile): Conditionally call init_timevar first.
(preprocess_options): Move some code to do_compile.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/timevar.c')
-rw-r--r-- | gcc/timevar.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/timevar.c b/gcc/timevar.c index 2eeeaa27ad7..534001bfe10 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -113,10 +113,9 @@ static double clocks_to_msec; #include "flags.h" #include "timevar.h" -/* See timevar.h for an explanation of timing variables. */ +static bool timevar_enable; -/* This macro evaluates to nonzero if timing variables are enabled. */ -#define TIMEVAR_ENABLE (time_report) +/* See timevar.h for an explanation of timing variables. */ /* A timing variable. */ @@ -187,7 +186,7 @@ get_time (now) now->sys = 0; now->wall = 0; - if (!TIMEVAR_ENABLE) + if (!timevar_enable) return; { @@ -225,10 +224,9 @@ timevar_accumulate (timer, start_time, stop_time) /* Initialize timing variables. */ void -init_timevar () +timevar_init () { - if (!TIMEVAR_ENABLE) - return; + timevar_enable = true; /* Zero all elapsed times. */ memset ((void *) timevars, 0, sizeof (timevars)); @@ -262,7 +260,7 @@ timevar_push (timevar) struct timevar_stack_def *context; struct timevar_time_def now; - if (!TIMEVAR_ENABLE) + if (!timevar_enable) return; /* Mark this timing variable as used. */ @@ -314,7 +312,7 @@ timevar_pop (timevar) struct timevar_time_def now; struct timevar_stack_def *popped = stack; - if (!TIMEVAR_ENABLE) + if (!timevar_enable) return; if (&timevars[timevar] != stack->timevar) @@ -353,7 +351,7 @@ timevar_start (timevar) { struct timevar_def *tv = &timevars[timevar]; - if (!TIMEVAR_ENABLE) + if (!timevar_enable) return; /* Mark this timing variable as used. */ @@ -378,7 +376,7 @@ timevar_stop (timevar) struct timevar_def *tv = &timevars[timevar]; struct timevar_time_def now; - if (!TIMEVAR_ENABLE) + if (!timevar_enable) return; /* TIMEVAR must have been started via timevar_start. */ @@ -430,7 +428,7 @@ timevar_print (fp) struct timevar_time_def *total = &timevars[TV_TOTAL].elapsed; struct timevar_time_def now; - if (!TIMEVAR_ENABLE) + if (!timevar_enable) return; /* Update timing information in case we're calling this from GDB. */ |