diff options
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 097b3ed77fdd..ea34c5a32c11 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -1032,16 +1032,18 @@ perf_evlist__should_poll(struct perf_evlist *evlist __maybe_unused, | |||
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | static int perf_evlist__mmap_per_evsel(struct perf_evlist *evlist, int idx, | 1034 | static int perf_evlist__mmap_per_evsel(struct perf_evlist *evlist, int idx, |
1035 | struct mmap_params *mp, int cpu, | 1035 | struct mmap_params *mp, int cpu_idx, |
1036 | int thread, int *_output, int *_output_backward) | 1036 | int thread, int *_output, int *_output_backward) |
1037 | { | 1037 | { |
1038 | struct perf_evsel *evsel; | 1038 | struct perf_evsel *evsel; |
1039 | int revent; | 1039 | int revent; |
1040 | int evlist_cpu = cpu_map__cpu(evlist->cpus, cpu_idx); | ||
1040 | 1041 | ||
1041 | evlist__for_each_entry(evlist, evsel) { | 1042 | evlist__for_each_entry(evlist, evsel) { |
1042 | struct perf_mmap *maps = evlist->mmap; | 1043 | struct perf_mmap *maps = evlist->mmap; |
1043 | int *output = _output; | 1044 | int *output = _output; |
1044 | int fd; | 1045 | int fd; |
1046 | int cpu; | ||
1045 | 1047 | ||
1046 | if (evsel->attr.write_backward) { | 1048 | if (evsel->attr.write_backward) { |
1047 | output = _output_backward; | 1049 | output = _output_backward; |
@@ -1060,6 +1062,10 @@ static int perf_evlist__mmap_per_evsel(struct perf_evlist *evlist, int idx, | |||
1060 | if (evsel->system_wide && thread) | 1062 | if (evsel->system_wide && thread) |
1061 | continue; | 1063 | continue; |
1062 | 1064 | ||
1065 | cpu = cpu_map__idx(evsel->cpus, evlist_cpu); | ||
1066 | if (cpu == -1) | ||
1067 | continue; | ||
1068 | |||
1063 | fd = FD(evsel, cpu, thread); | 1069 | fd = FD(evsel, cpu, thread); |
1064 | 1070 | ||
1065 | if (*output == -1) { | 1071 | if (*output == -1) { |