From c8af5a6ce893b2d7656d844d681c92e239e6f155 Mon Sep 17 00:00:00 2001 From: Sergio Gelato Date: Wed, 19 Sep 2018 11:58:31 -0300 Subject: [PATCH] parse_ras_data: initialize record.cpu before pevent_print_event(). pevent_print_event() prints record.cpu; make sure it's initialized. The cpu field from pthread_data is my best guess at a suitable value: parse_ras_data() was already printing it separately. 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 9c3f210..3cdac19 100644 --- a/ras-events.c +++ b/ras-events.c @@ -302,6 +302,7 @@ static void parse_ras_data(struct pthread_data *pdata, struct kbuffer *kbuf, record.size = kbuffer_event_size(kbuf); record.data = data; record.offset = kbuffer_curr_offset(kbuf); + record.cpu = pdata->cpu; /* note offset is just offset in subbuffer */ record.missed_events = kbuffer_missed_events(kbuf); @@ -309,7 +310,6 @@ static void parse_ras_data(struct pthread_data *pdata, struct kbuffer *kbuf, /* TODO - logging */ trace_seq_init(&s); - printf("cpu %02d:", pdata->cpu); pevent_print_event(pdata->ras->pevent, &s, &record); trace_seq_do_printf(&s); printf("\n"); -- 2.50.1