diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 07:24:38 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 17:34:45 -0400 |
commit | fe1f61b37ffada9fc7ec2c9d4ca5376b5a797dbc (patch) | |
tree | 5301cb4bad68af7cd9bdddebbe98c37bf0097c86 /tools/perf/util/evlist.c | |
parent | d400bd3abf2cc68df2df32047d3533faf690f404 (diff) |
libperf: Add own_cpus to struct perf_evsel
Move own_cpus from tools/perf's evsel to libbpf's perf_evsel.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-52-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 713968130d1d..d203305ac187 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -159,12 +159,12 @@ static void __perf_evlist__propagate_maps(struct evlist *evlist, | |||
159 | * We already have cpus for evsel (via PMU sysfs) so | 159 | * We already have cpus for evsel (via PMU sysfs) so |
160 | * keep it, if there's no target cpu list defined. | 160 | * keep it, if there's no target cpu list defined. |
161 | */ | 161 | */ |
162 | if (!evsel->own_cpus || evlist->has_user_cpus) { | 162 | if (!evsel->core.own_cpus || evlist->has_user_cpus) { |
163 | perf_cpu_map__put(evsel->core.cpus); | 163 | perf_cpu_map__put(evsel->core.cpus); |
164 | evsel->core.cpus = perf_cpu_map__get(evlist->cpus); | 164 | evsel->core.cpus = perf_cpu_map__get(evlist->cpus); |
165 | } else if (evsel->core.cpus != evsel->own_cpus) { | 165 | } else if (evsel->core.cpus != evsel->core.own_cpus) { |
166 | perf_cpu_map__put(evsel->core.cpus); | 166 | perf_cpu_map__put(evsel->core.cpus); |
167 | evsel->core.cpus = perf_cpu_map__get(evsel->own_cpus); | 167 | evsel->core.cpus = perf_cpu_map__get(evsel->core.own_cpus); |
168 | } | 168 | } |
169 | 169 | ||
170 | perf_thread_map__put(evsel->threads); | 170 | perf_thread_map__put(evsel->threads); |