summaryrefslogtreecommitdiff
path: root/tools/perf/util/env.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-10-20 21:57:21 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-11-04 15:42:41 +0300
commitef0580ecd8b0306acf09b7a7508d72cafc67896d (patch)
tree93d96c8a73ca926d3f14819a6dc107e1f18e3964 /tools/perf/util/env.h
parent20e88c6076fc50ebf0560e730349000ff2da94fd (diff)
downloadlinux-ef0580ecd8b0306acf09b7a7508d72cafc67896d.tar.xz
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;