diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-08-31 04:24:24 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-08-31 04:24:24 -0400 |
commit | 4c09e0d6ba65507a0ee0ca9abc5335e4f7bd7404 (patch) | |
tree | 256c1711786b9f98694c8b3f9ae97ed54e599aa9 /tools/perf | |
parent | 64291f7db5bd8150a74ad2036f1037e6a0428df2 (diff) | |
parent | 601083cffb7cabdcc55b8195d732f0f7028570fa (diff) |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fix from Arnaldo Carvalho de Melo:
- Use index, not CPU id, to find core/pkg id in 'perf stat' (Kan Liang)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-stat.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index d99d850e1444..ef355fc0e870 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -694,7 +694,7 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg) | |||
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) | |||
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; |