From e4a8a6c5b3a6625c821d7bac32ccdec25ce5f594 Mon Sep 17 00:00:00 2001 From: Sergio Gelato Date: Wed, 19 Sep 2018 11:57:42 -0300 Subject: [PATCH] parse_ras_data: flush trace buffer immediately, not on next call parse_ras_data() was calling fflush() before, not after printf(). As a result, information about an event would not be printed immediately but possibly much later. Signed-off-by: Sergio Gelato Signed-off-by: Mauro Carvalho Chehab --- ras-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ras-events.c b/ras-events.c index a63725c..9c3f210 100644 --- a/ras-events.c +++ b/ras-events.c @@ -310,10 +310,10 @@ static void parse_ras_data(struct pthread_data *pdata, struct kbuffer *kbuf, /* TODO - logging */ trace_seq_init(&s); printf("cpu %02d:", pdata->cpu); - fflush(stdout); pevent_print_event(pdata->ras->pevent, &s, &record); trace_seq_do_printf(&s); printf("\n"); + fflush(stdout); } static int get_num_cpus(struct ras_events *ras) -- 2.50.1