diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 13:24:30 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 18:34:45 -0300 |
commit | 9c3516d1b850ea938b074df33e4c86d721c77720 (patch) | |
tree | cb937368ee6d8048f465bcbe27d62709f871212c /tools/perf/util/record.c | |
parent | 1fc632cef4ea137bc45fd0fc4cb902e374064163 (diff) | |
download | linux-stable-9c3516d1b850ea938b074df33e4c86d721c77720.tar.gz linux-stable-9c3516d1b850ea938b074df33e4c86d721c77720.tar.bz2 linux-stable-9c3516d1b850ea938b074df33e4c86d721c77720.zip |
libperf: Add perf_cpu_map__new()/perf_cpu_map__read() functions
Moving the following functions from tools/perf:
cpu_map__new()
cpu_map__read()
to libperf with the following names:
perf_cpu_map__new()
perf_cpu_map__read()
Committer notes:
Fixed up this one:
tools/perf/arch/arm/util/cs-etm.c
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-44-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/record.c')
-rw-r--r-- | tools/perf/util/record.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c index 445788819969..03dcdb3f33a7 100644 --- a/tools/perf/util/record.c +++ b/tools/perf/util/record.c @@ -6,6 +6,7 @@ #include <errno.h> #include <api/fs/fs.h> #include <subcmd/parse-options.h> +#include <perf/cpumap.h> #include "util.h" #include "cloexec.h" @@ -63,7 +64,7 @@ static bool perf_probe_api(setup_probe_fn_t fn) struct perf_cpu_map *cpus; int cpu, ret, i = 0; - cpus = cpu_map__new(NULL); + cpus = perf_cpu_map__new(NULL); if (!cpus) return false; cpu = cpus->map[0]; @@ -118,7 +119,7 @@ bool perf_can_record_cpu_wide(void) struct perf_cpu_map *cpus; int cpu, fd; - cpus = cpu_map__new(NULL); + cpus = perf_cpu_map__new(NULL); if (!cpus) return false; cpu = cpus->map[0]; @@ -275,7 +276,7 @@ bool perf_evlist__can_select_event(struct evlist *evlist, const char *str) evsel = perf_evlist__last(temp_evlist); if (!evlist || cpu_map__empty(evlist->cpus)) { - struct perf_cpu_map *cpus = cpu_map__new(NULL); + struct perf_cpu_map *cpus = perf_cpu_map__new(NULL); cpu = cpus ? cpus->map[0] : 0; perf_cpu_map__put(cpus); |