summaryrefslogtreecommitdiffstats
path: root/tools/perf/lib/include
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-09-02 14:12:53 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-10 14:33:32 +0100
commit4256d434935e9c85a731823be562785494ca364b (patch)
tree332664e6c61b1ea891cd2b3849b15a28361d1ab7 /tools/perf/lib/include
parent227cb129858a3eb4b874937274b09834ffcc39b0 (diff)
downloadlinux-4256d434935e9c85a731823be562785494ca364b.tar.bz2
libperf: Adopt perf_cpu_map__max() function
From 'perf stat', so that it can be used from multiple places. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Joe Mario <jmario@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20190902121255.536-2-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/lib/include/perf/cpumap.h b/tools/perf/lib/include/perf/cpumap.h
index 8aa995c59498..ac9aa497f84a 100644
--- a/tools/perf/lib/include/perf/cpumap.h
+++ b/tools/perf/lib/include/perf/cpumap.h
@@ -16,6 +16,7 @@ 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);
+LIBPERF_API int perf_cpu_map__max(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); \