summaryrefslogtreecommitdiff
path: root/gcc/timevar.h
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-21 23:00:23 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-21 23:00:23 +0000
commit1da863225a6557fbf4c60556f620cee43bbb162f (patch)
tree4ea0ed08ffb8f8e095b4d94390460ac81a328a89 /gcc/timevar.h
parentc627001c253cefb4fbec1d0502a8710b6f746bbd (diff)
downloadgcc-1da863225a6557fbf4c60556f620cee43bbb162f.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/timevar.h')
-rw-r--r--gcc/timevar.h25
1 files changed, 20 insertions, 5 deletions
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 */