X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftimevar.h;h=e776dbf07f50d7897872343adfeb608106183e52;hb=a858fcb70e3a0e58282e435098fd34b169199bbc;hp=8b4caba2e357d3c4a2a9da2238899f2e67c318e8;hpb=0b1615c133993fbd20dcf2b33f21e81d8cc2442c;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/timevar.h b/gcc/timevar.h index 8b4caba2e35..e776dbf07f5 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 */