Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1431440 > unrolled thread

[RFC PATCH v2 08/26] perf bpf: Add UBPF flags and makefile options

Started byHe Kuang <hekuang@huawei.com>
First post2016-06-26 13:30 +0200
Last post2016-06-26 13:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC PATCH v2 08/26] perf bpf: Add UBPF flags and makefile options He Kuang <hekuang@huawei.com> - 2016-06-26 13:30 +0200

#1431440 — [RFC PATCH v2 08/26] perf bpf: Add UBPF flags and makefile options

FromHe Kuang <hekuang@huawei.com>
Date2016-06-26 13:30 +0200
Subject[RFC PATCH v2 08/26] perf bpf: Add UBPF flags and makefile options
Message-ID<rOgqd-2jQ-1@gated-at.bofh.it>
From: Wang Nan <wangnan0@huawei.com>

UBPF are not built by default, unless user explicitly build perf with
UBPF defined.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Signed-off-by: He Kuang <hekuang@huawei.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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web