-void stat_ev_emit(const char *name, double value)
-{
- if (file_ev) {
- unsigned long start = get_time();
- unsigned id = ctx_sp >= 0 ? ctx_stack[ctx_sp].hash : 0;
-
- fprintf(file_ev, "E %10x %30s %30f %10ld %10ld\n", id, name, value, start, time_in_ev);
-
- if(print_events != NULL) {
- print_ev_t *print_ev = print_events;
- while(print_ev != NULL) {
- /* maybe wanna use regexes instead of strcmp? */
- if(strstr(name, print_ev->filter) != NULL) {
- maybe_print_context();
- fprintf(stderr, "\t%20s %30f\n", name, value);
- }
-
- print_ev = print_ev->next;
- }
- }
-
- time_in_ev += get_time() - start;
+ va_start(args, fmt);
+ ir_vsnprintf(buf, sizeof(buf), fmt, args);
+ va_end(args);
+ mfprintf(stat_ev_file, ";%s", buf);