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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
d400bd3abf
commit
fe1f61b37f
@@ -3861,10 +3861,10 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool,
|
||||
int max, err;
|
||||
u16 type;
|
||||
|
||||
if (!evsel->own_cpus)
|
||||
if (!evsel->core.own_cpus)
|
||||
return 0;
|
||||
|
||||
ev = cpu_map_data__alloc(evsel->own_cpus, &size, &type, &max);
|
||||
ev = cpu_map_data__alloc(evsel->core.own_cpus, &size, &type, &max);
|
||||
if (!ev)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -3874,7 +3874,7 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool,
|
||||
ev->id = evsel->id[0];
|
||||
|
||||
cpu_map_data__synthesize((struct cpu_map_data *) ev->data,
|
||||
evsel->own_cpus,
|
||||
evsel->core.own_cpus,
|
||||
type, max);
|
||||
|
||||
err = process(tool, (union perf_event*) ev, NULL, NULL);
|
||||
@@ -3985,7 +3985,7 @@ int perf_event__synthesize_extra_attr(struct perf_tool *tool,
|
||||
}
|
||||
}
|
||||
|
||||
if (counter->own_cpus) {
|
||||
if (counter->core.own_cpus) {
|
||||
err = perf_event__synthesize_event_update_cpus(tool, counter, process);
|
||||
if (err < 0) {
|
||||
pr_err("Couldn't synthesize evsel cpus.\n");
|
||||
@@ -4082,7 +4082,7 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused,
|
||||
|
||||
map = cpu_map__new_data(&ev_cpus->cpus);
|
||||
if (map)
|
||||
evsel->own_cpus = map;
|
||||
evsel->core.own_cpus = map;
|
||||
else
|
||||
pr_err("failed to get event_update cpus\n");
|
||||
default:
|
||||
|
Reference in New Issue
Block a user