Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Use index, not CPU id, to find core/pkg id in 'perf stat' (Kan Liang)
Unified · Split
| @@ -694,7 +694,7 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg) · 693 unmodified lines | |||
| 694 | static void print_aggr(char *prefix) | 694 | static void print_aggr(char *prefix) |
| 695 | { | 695 | { |
| 696 | struct perf_evsel *counter; | 696 | struct perf_evsel *counter; |
| 697 | int cpu, cpu2, s, s2, id, nr; | 697 | int cpu, s, s2, id, nr; |
| 698 | double uval; | 698 | double uval; |
| 699 | u64 ena, run, val; | 699 | u64 ena, run, val; |
| 700 | 700 | ||
| @@ -707,8 +707,7 @@ static void print_aggr(char *prefix) · 6 unmodified lines | |||
| 707 | val = ena = run = 0; | 707 | val = ena = run = 0; |
| 708 | nr = 0; | 708 | nr = 0; |
| 709 | for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) { | 709 | for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) { |
| 710 | cpu2 = perf_evsel__cpus(counter)->map[cpu]; | 710 | s2 = aggr_get_id(perf_evsel__cpus(counter), cpu); |
| 711 | s2 = aggr_get_id(evsel_list->cpus, cpu2); | ||
| 712 | if (s2 != id) | 711 | if (s2 != id) |
| 713 | continue; | 712 | continue; |
| 714 | val += perf_counts(counter->counts, cpu, 0)->val; | 713 | val += perf_counts(counter->counts, cpu, 0)->val; |