diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 13:24:43 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 23:34:45 +0200 |
commit | 453fa03090a64c0e0a561f10dfd5e8747796949c (patch) | |
tree | 6564b16701f97ca029f27513b0d19c1fc478146f /tools/perf/builtin-script.c | |
parent | libperf: Add threads to struct perf_evlist (diff) | |
download | linux-453fa03090a64c0e0a561f10dfd5e8747796949c.tar.xz linux-453fa03090a64c0e0a561f10dfd5e8747796949c.zip |
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/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index a787c5cb1331..46fadbbe1c3e 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -48,6 +48,7 @@ #include <fcntl.h> #include <unistd.h> #include <subcmd/pager.h> +#include <perf/evlist.h> #include <linux/ctype.h> @@ -3264,7 +3265,7 @@ static int set_maps(struct perf_script *script) if (WARN_ONCE(script->allocated, "stats double allocation\n")) return -EINVAL; - perf_evlist__set_maps(evlist, script->cpus, script->threads); + perf_evlist__set_maps(&evlist->core, script->cpus, script->threads); if (perf_evlist__alloc_stats(evlist, true)) return -ENOMEM; |