Trace files version 7 stores only CPUs with trace data in the file, empty CPUs are ommited. Fixed tracecmd_peek_data() to handle that case, set the CPU in the record - do not use CPU indfex, but CPU id. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> --- lib/trace-cmd/trace-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index 593ea3bd..c62d5fbe 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -2404,7 +2404,7 @@ read_again: record->ts = handle->cpu_data[cpu].timestamp; record->size = kbuffer_event_size(kbuf); - record->cpu = cpu; + record->cpu = handle->cpu_data[cpu].cpu; record->data = data; record->offset = handle->cpu_data[cpu].offset + index; record->missed_events = kbuffer_missed_events(kbuf); -- 2.31.1