aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-08-21 16:39:29 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-08-22 17:16:57 -0300
commitf7004f5990e230710112b89f2f11777e5e64e258 (patch)
tree6f3903a9ace91e5454af313bbaa3ee5b88a6b651 /tools/perf/util/evsel.h
parentperf x86 kvm-stat: Add missing string.h header (diff)
downloadlinux-dev-f7004f5990e230710112b89f2f11777e5e64e258.tar.xz
linux-dev-f7004f5990e230710112b89f2f11777e5e64e258.zip
perf evsel: Switch to libperf's cpumap.h
We don't need what is in perf's util/cpumap.h, just the struct cpu_map that is in libperf's internal/cpumap.h file to cover this one case: tools/perf/util/evsel.h:215:27: error: dereferencing pointer to incomplete type ‘struct perf_cpu_map’ 215 | return evsel__cpus(evsel)->nr; So switch to libperf's cpumap.h and add some missing struct foward declarations and include sys/types.h to get pid_t. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-ufjkpohijti05ggk69s91ktf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index cd336cf2eaa9..5a351cae66df 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -5,14 +5,17 @@
#include <linux/list.h>
#include <stdbool.h>
#include <stdio.h>
+#include <sys/types.h>
#include <linux/perf_event.h>
#include <linux/types.h>
#include <internal/evsel.h>
#include <perf/evsel.h>
#include "symbol_conf.h"
-#include "cpumap.h"
+#include <internal/cpumap.h>
+struct addr_location;
struct evsel;
+union perf_event;
/*
* Per fd, to map back from PERF_SAMPLE_ID to evsel, only used when there are