From: Martin Zidek Date: Wed, 20 May 2009 21:24:51 +0000 (+0200) Subject: timing: output trace format changed (only for file output for now) X-Git-Url: https://rtime.felk.cvut.cz/gitweb/eurobot/public.git/commitdiff_plain/9527b71cfba9f98de8af723ecbd49f906efc4102 timing: output trace format changed (only for file output for now) --- diff --git a/src/timing/timing.c b/src/timing/timing.c index 4cfc66fa..eae74a1b 100644 --- a/src/timing/timing.c +++ b/src/timing/timing.c @@ -45,6 +45,7 @@ bool timestamp_enabled = true; static int cnt=0; struct timespec meas_start_ts; FILE *file; +static pid_t pid=-1; void timing_statistics_asm(void); void timing_output_trace_screen(void); @@ -132,7 +133,7 @@ void print_tstamp_to_schedclock(timestamp_t *ts) printf("%d %5lu.%06lu\n", ts->id, sec, usec); #endif #ifdef CONFIG_TIMING_OUTPUT_FILE - fprintf(file, "%d:%5lu.%06lu:%llu\n", ts->id, sec, usec, tb); + fprintf(file, "%5lu.%06lu\t%d\t%d\tR\t%llu\n", sec, usec, pid, ts->id, tb); #endif } #endif @@ -428,3 +429,7 @@ void timing_statistics_clock_gettime(void) } #endif +void timing_set_pid(pid_t set_pid) +{ + pid = set_pid; +}