diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-21 23:00:23 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-21 23:00:23 +0000 |
commit | 613b1547cb3671c682f5af945050cde2c8ed4c6a (patch) | |
tree | 4ea0ed08ffb8f8e095b4d94390460ac81a328a89 /gcc/timevar.h | |
parent | 5d127eeb298103e87782c6492700d328b04dcb49 (diff) | |
download | gcc-613b1547cb3671c682f5af945050cde2c8ed4c6a.zip gcc-613b1547cb3671c682f5af945050cde2c8ed4c6a.tar.gz gcc-613b1547cb3671c682f5af945050cde2c8ed4c6a.tar.bz2 |
Makefile.in: Fix c-pch.o and ggc-common.o dependencies on timevars.
* Makefile.in: Fix c-pch.o and ggc-common.o dependencies on timevars.
* timevar.c: Do not include any core headers.
(timevar_print): De-i18n-ize.
(print_time): Likewise.
* timevar.h (timevar_push, timevar_pop): Make inline functions.
From-SVN: r159687
Diffstat (limited to 'gcc/timevar.h')
-rw-r--r-- | gcc/timevar.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/gcc/timevar.h b/gcc/timevar.h index 8b4caba..e776dbf 100644 --- a/gcc/timevar.h +++ b/gcc/timevar.h @@ -80,10 +80,15 @@ typedef enum timevar_id_t; #undef DEFTIMEVAR +/* True if timevars should be used. In GCC, this happens with + the -ftime-report flag. */ +extern bool timevar_enable; + +/* Total amount of memory allocated by garbage collector. */ +extern size_t timevar_ggc_mem_total; + /* Execute the sequence: timevar_pop (TV), return (E); */ #define POP_TIMEVAR_AND_RETURN(TV, E) do { timevar_pop (TV); return (E); }while(0) -#define timevar_pop(TV) do { if (timevar_enable) timevar_pop_1 (TV); }while(0) -#define timevar_push(TV) do { if (timevar_enable) timevar_push_1 (TV); }while(0) extern void timevar_init (void); extern void timevar_push_1 (timevar_id_t); @@ -93,10 +98,20 @@ extern void timevar_stop (timevar_id_t); extern void timevar_print (FILE *); /* Provided for backward compatibility. */ -extern void print_time (const char *, long); +static inline void +timevar_push (timevar_id_t tv) +{ + if (timevar_enable) + timevar_push_1 (tv); +} -extern bool timevar_enable; +static inline void +timevar_pop (timevar_id_t tv) +{ + if (timevar_enable) + timevar_pop_1 (tv); +} -extern size_t timevar_ggc_mem_total; +extern void print_time (const char *, long); #endif /* ! GCC_TIMEVAR_H */ |