aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/env.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-10-20 15:57:21 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-11-04 09:42:41 -0300
commitef0580ecd8b0306acf09b7a7508d72cafc67896d (patch)
tree93d96c8a73ca926d3f14819a6dc107e1f18e3964 /tools/perf/util/env.h
parentperf annotate: Move bpf header inclusion to inside HAVE_LIBBPF_SUPPORT (diff)
downloadlinux-dev-ef0580ecd8b0306acf09b7a7508d72cafc67896d.tar.xz
linux-dev-ef0580ecd8b0306acf09b7a7508d72cafc67896d.zip
perf env: Conditionally compile BPF support code on having HAVE_LIBBPF_SUPPORT
If libbpf isn't selected, no need for a bunch of related code, that were not even being used, as code using these perf_env methods was also enclosed in HAVE_LIBBPF_SUPPORT. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/env.h')
-rw-r--r--tools/perf/util/env.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/env.h b/tools/perf/util/env.h
index a12972652006..ca249bf5e984 100644
--- a/tools/perf/util/env.h
+++ b/tools/perf/util/env.h
@@ -77,7 +77,7 @@ struct perf_env {
struct numa_node *numa_nodes;
struct memory_node *memory_nodes;
unsigned long long memory_bsize;
-
+#ifdef HAVE_LIBBPF_SUPPORT
/*
* bpf_info_lock protects bpf rbtrees. This is needed because the
* trees are accessed by different threads in perf-top
@@ -89,7 +89,7 @@ struct perf_env {
struct rb_root btfs;
u32 btfs_cnt;
} bpf_progs;
-
+#endif // HAVE_LIBBPF_SUPPORT
/* same reason as above (for perf-top) */
struct {
struct rw_semaphore lock;