perf env: Conditionally compile BPF support code on having HAVE_LIBBPF_SUPPORT
[linux-2.6-microblaze.git] / tools / perf / util / env.h
index a129726..ca249bf 100644 (file)
@@ -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;