[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1466940078-65581-9-git-send-email-hekuang@huawei.com>
Date: Sun, 26 Jun 2016 11:21:00 +0000
From: He Kuang <hekuang@...wei.com>
To: <acme@...nel.org>, <peterz@...radead.org>, <mingo@...hat.com>,
<jolsa@...hat.com>, <brendan.d.gregg@...il.com>, <ast@...nel.org>,
<alexander.shishkin@...ux.intel.com>, <wangnan0@...wei.com>,
<hekuang@...wei.com>
CC: <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH v2 08/26] perf bpf: Add UBPF flags and makefile options
From: Wang Nan <wangnan0@...wei.com>
UBPF are not built by default, unless user explicitly build perf with
UBPF defined.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
Signed-off-by: He Kuang <hekuang@...wei.com>
---
tools/lib/bpf/Makefile | 4 ++++
tools/perf/Makefile.perf | 2 ++
tools/perf/config/Makefile | 4 ++++
3 files changed, 10 insertions(+)
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index fc1bc75..1fb098d 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -120,6 +120,10 @@ ifeq ($(feature-libelf-getphdrnum), 1)
override CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT
endif
+ifdef UBPF
+ override CFLAGS += -DHAVE_UBPF_SUPPORT
+endif
+
# Append required CFLAGS
override CFLAGS += $(EXTRA_WARNINGS)
override CFLAGS += -Werror -Wall
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index d0a2cb1..114a719 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -81,6 +81,8 @@ include ../scripts/utilities.mak
#
# Define NO_LIBBPF if you do not want BPF support
#
+# Define UBPF if you DO want user space BPF support
+#
# Define FEATURES_DUMP to provide features detection dump file
# and bypass the feature detection
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 534c811..2a64534 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -329,6 +329,10 @@ ifndef NO_LIBELF
ifeq ($(feature-bpf), 1)
CFLAGS += -DHAVE_LIBBPF_SUPPORT
$(call detected,CONFIG_LIBBPF)
+ ifdef UBPF
+ CFLAGS += -DHAVE_UBPF_SUPPORT
+ $(call detected,CONFIG_UBPF)
+ endif
endif
ifndef NO_DWARF
--
1.8.5.2
Powered by blists - more mailing lists