X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Fstatev.c;h=3d61face24e8a12c73e4f5076c4958c5521cb9ec;hb=7fc5212efdd0faf06fed3850760ca319bdc66afc;hp=f327db0d4da7f028ab50bf745010835a432816ca;hpb=0fbcef83aa6060534172bb13e71cdadb04428806;p=libfirm diff --git a/ir/stat/statev.c b/ir/stat/statev.c index f327db0d4..3d61face2 100644 --- a/ir/stat/statev.c +++ b/ir/stat/statev.c @@ -39,6 +39,8 @@ #include "config.h" +#if defined(FIRM_STATISTICS) && !defined(DISABLE_STATEV) + #ifdef HAVE_REGEX_H #define FIRM_HAVE_REGEX #endif @@ -54,7 +56,7 @@ #include #define mfprintf gzprintf -static gzFile* stat_ev_file = NULL; +static gzFile stat_ev_file = NULL; #else @@ -63,18 +65,16 @@ static FILE* stat_ev_file = NULL; #endif /* FIRM_HAVE_LIBZ */ -int stat_ev_enabled = 0; -int stat_ev_timer_sp = 0; -timing_ticks_t stat_ev_timer_elapsed[MAX_TIMER]; -timing_ticks_t stat_ev_timer_start[MAX_TIMER]; -timing_sched_env_t stat_ev_sched_rt; -timing_sched_env_t stat_ev_sched_normal; +int stat_ev_enabled = 0; +int stat_ev_timer_sp = 0; +timing_ticks_t stat_ev_timer_elapsed[MAX_TIMER]; +timing_ticks_t stat_ev_timer_start[MAX_TIMER]; #ifdef FIRM_HAVE_REGEX #include static regex_t regex; static regex_t *filter = NULL; -static INLINE int key_matches(const char *key) +static inline int key_matches(const char *key) { if (!filter) return 1; @@ -84,7 +84,7 @@ static INLINE int key_matches(const char *key) #else static char filter[128] = { '\0' }; -static INLINE int key_matches(const char *key) +static inline int key_matches(const char *key) { int i = 0; @@ -122,10 +122,10 @@ void stat_ev_begin(const char *prefix, const char *filt) #ifdef FIRM_HAVE_LIBZ snprintf(buf, sizeof(buf), "%s.ev.gz", prefix); - stat_ev_file = gzopen(buf, "wt9"); + stat_ev_file = gzopen(buf, "wt9"); #else snprintf(buf, sizeof(buf), "%s.ev", prefix); - stat_ev_file = fopen(buf, "wt"); + stat_ev_file = fopen(buf, "wt"); #endif if (filt && filt[0] != '\0') { @@ -139,8 +139,6 @@ void stat_ev_begin(const char *prefix, const char *filt) } stat_ev_enabled = stat_ev_file != NULL; - timing_sched_get(&stat_ev_sched_normal); - timing_sched_prepare_max_prio(&stat_ev_sched_rt); } void stat_ev_end(void) @@ -154,3 +152,5 @@ void stat_ev_end(void) #endif } } + +#endif