summaryrefslogtreecommitdiff
path: root/tools/perf/util/cpumap.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-07-21 13:24:15 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-29 18:34:44 -0300
commit959b83c769389b24d64759f60e64c4c62620ff02 (patch)
treec09e4d141e66c8854585c102b87abae70f0606b4 /tools/perf/util/cpumap.h
parenta1556f8479ed58b8d5a33aef54578bad0165c7e7 (diff)
libperf: Add perf_cpu_map struct
Add perf_cpu_map struct to libperf. It's added as a declaration into: include/perf/cpumap.h which will be included by users. The perf_cpu_map struct definition is added into: include/internal/cpumap.h which is not to be included by users, but shared within perf and libperf. We tried the total separation of the perf_cpu_map struct in libperf, but it lead to complications and much bigger changes in perf code, so we decided to share the declaration. 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-29-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cpumap.h')
-rw-r--r--tools/perf/util/cpumap.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h
index 22729beae959..c2ba9ae195f7 100644
--- a/tools/perf/util/cpumap.h
+++ b/tools/perf/util/cpumap.h
@@ -5,16 +5,11 @@
#include <stdio.h>
#include <stdbool.h>
#include <linux/refcount.h>
+#include <internal/cpumap.h>
#include "perf.h"
#include "util/debug.h"
-struct perf_cpu_map {
- refcount_t refcnt;
- int nr;
- int map[];
-};
-
struct perf_cpu_map *cpu_map__new(const char *cpu_list);
struct perf_cpu_map *cpu_map__empty_new(int nr);
struct perf_cpu_map *cpu_map__dummy_new(void);