libperf: Add perf_evlist__set_maps() function

Move the evlist__set_maps() function from tools/perf to libperf.

Committer notes:

Fix up reject due to earlier inversion in calling perf_evlist__init().

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-57-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa
2019-07-21 13:24:43 +02:00
committed by Arnaldo Carvalho de Melo
parent 03617c22e3
commit 453fa03090
14 changed files with 83 additions and 67 deletions

View File

@@ -6,6 +6,8 @@
struct perf_evlist;
struct perf_evsel;
struct perf_cpu_map;
struct perf_thread_map;
LIBPERF_API void perf_evlist__init(struct perf_evlist *evlist);
LIBPERF_API void perf_evlist__add(struct perf_evlist *evlist,
@@ -22,4 +24,8 @@ LIBPERF_API struct perf_evsel* perf_evlist__next(struct perf_evlist *evlist,
(pos) != NULL; \
(pos) = perf_evlist__next((evlist), (pos)))
LIBPERF_API void perf_evlist__set_maps(struct perf_evlist *evlist,
struct perf_cpu_map *cpus,
struct perf_thread_map *threads);
#endif /* __LIBPERF_EVLIST_H */