summaryrefslogtreecommitdiffstats
path: root/tools/perf/lib/include
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-08-22 13:11:39 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-08-22 11:17:03 -0300
commit315c0a1f0ccdd44c65f80ccbc62202fed8a23050 (patch)
tree7a4ba0191b49d5ec462d2d7c8a9fb472475c47ee /tools/perf/lib/include
parent6549cd8f2cc2cdf7e107fbbc3a68ecefb774bb2f (diff)
downloadlinux-315c0a1f0ccdd44c65f80ccbc62202fed8a23050.tar.gz
linux-315c0a1f0ccdd44c65f80ccbc62202fed8a23050.tar.bz2
linux-315c0a1f0ccdd44c65f80ccbc62202fed8a23050.zip
libperf: Move perf's cpu_map__empty() to perf_cpu_map__empty()
So it's part of the libperf library as one of basic functions operating on the perf_cpu_map class. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@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/20190822111141.25823-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/lib/include')
-rw-r--r--tools/perf/lib/include/perf/cpumap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/lib/include/perf/cpumap.h b/tools/perf/lib/include/perf/cpumap.h
index 1b6e7db3fa2b..8aa995c59498 100644
--- a/tools/perf/lib/include/perf/cpumap.h
+++ b/tools/perf/lib/include/perf/cpumap.h
@@ -4,6 +4,7 @@
#include <perf/core.h>
#include <stdio.h>
+#include <stdbool.h>
struct perf_cpu_map;
@@ -14,6 +15,7 @@ LIBPERF_API struct perf_cpu_map *perf_cpu_map__get(struct perf_cpu_map *map);
LIBPERF_API void perf_cpu_map__put(struct perf_cpu_map *map);
LIBPERF_API int perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx);
LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus);
+LIBPERF_API bool perf_cpu_map__empty(const struct perf_cpu_map *map);
#define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \
for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \