summaryrefslogtreecommitdiff
path: root/tools/perf/tests/code-reading.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-07-21 13:24:43 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-29 18:34:45 -0300
commit453fa03090a64c0e0a561f10dfd5e8747796949c (patch)
tree6564b16701f97ca029f27513b0d19c1fc478146f /tools/perf/tests/code-reading.c
parent03617c22e31f32cbf0e4797e216db898fb898d90 (diff)
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>
Diffstat (limited to 'tools/perf/tests/code-reading.c')
-rw-r--r--tools/perf/tests/code-reading.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index bfaf22c2023c..e45df0736261 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -9,6 +9,7 @@
#include <string.h>
#include <sys/param.h>
#include <perf/cpumap.h>
+#include <perf/evlist.h>
#include "parse-events.h"
#include "evlist.h"
@@ -629,7 +630,7 @@ static int do_test_code_reading(bool try_kcore)
goto out_put;
}
- perf_evlist__set_maps(evlist, cpus, threads);
+ perf_evlist__set_maps(&evlist->core, cpus, threads);
str = do_determine_event(excl_kernel);
pr_debug("Parsing event '%s'\n", str);
@@ -658,7 +659,7 @@ static int do_test_code_reading(bool try_kcore)
*/
perf_cpu_map__get(cpus);
perf_thread_map__get(threads);
- perf_evlist__set_maps(evlist, NULL, NULL);
+ perf_evlist__set_maps(&evlist->core, NULL, NULL);
evlist__delete(evlist);
evlist = NULL;
continue;