perf script: Fix flipped index and cpu

Bugzilla: https://bugzilla.redhat.com/2069073

upstream
========
commit b57af1b4017abff969425dffd6f59ddfdedce8cb
Author: Ian Rogers <irogers@google.com>
Date: Tue Jan 4 22:13:49 2022 -0800

description
===========
perf_counts are accessed by the densely packed index.

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
This commit is contained in:
Michael Petlan 2022-05-03 22:01:16 +02:00
parent 73523fd0cd
commit 42e6eb0fba
1 changed files with 1 additions and 1 deletions

View File

@ -2131,7 +2131,7 @@ static void __process_stat(struct evsel *counter, u64 tstamp)
perf_cpu_map__for_each_cpu(cpu, idx, evsel__cpus(counter)) {
struct perf_counts_values *counts;
counts = perf_counts(counter->counts, cpu, thread);
counts = perf_counts(counter->counts, idx, thread);
printf("%3d %8d %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %s\n",
cpu,