[PATCH bpf-next] bpftool: remove useless #include to <perf-sys.h> from map_perf_ring.c

Subsystems: bpf [general] (safe dynamic programs and tools), bpf [tooling] (bpftool), the rest

STALE1760d LANDED

Landed in mainline as efc36d6c642a on 2021-10-20.

2 messages, 2 authors, 2021-10-20 · open the first message on its own page

[PATCH bpf-next] bpftool: remove useless #include to <perf-sys.h> from map_perf_ring.c

From: Quentin Monnet <hidden>
Date: 2021-10-20 09:48:35

The header is no longer needed since the event_pipe implementation
was updated to rely on libbpf's perf_buffer. This makes bpftool free of
dependencies to perf files, and we can update the Makefile accordingly.

Fixes: 9b190f185d2f ("tools/bpftool: switch map event_pipe to libbpf's perf_buffer")
Signed-off-by: Quentin Monnet <redacted>
---
 tools/bpf/bpftool/Makefile        | 3 +--
 tools/bpf/bpftool/map_perf_ring.c | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index abcef1f72d65..098d762e111a 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -73,8 +73,7 @@ CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
 	-I$(LIBBPF_INCLUDE) \
 	-I$(srctree)/kernel/bpf/ \
 	-I$(srctree)/tools/include \
-	-I$(srctree)/tools/include/uapi \
-	-I$(srctree)/tools/perf
+	-I$(srctree)/tools/include/uapi
 CFLAGS += -DBPFTOOL_VERSION='"$(BPFTOOL_VERSION)"'
 ifneq ($(EXTRA_CFLAGS),)
 CFLAGS += $(EXTRA_CFLAGS)
diff --git a/tools/bpf/bpftool/map_perf_ring.c b/tools/bpf/bpftool/map_perf_ring.c
index 825f29f93a57..b98ea702d284 100644
--- a/tools/bpf/bpftool/map_perf_ring.c
+++ b/tools/bpf/bpftool/map_perf_ring.c
@@ -22,7 +22,6 @@
 #include <sys/syscall.h>
 
 #include <bpf/bpf.h>
-#include <perf-sys.h>
 
 #include "main.h"
 
-- 
2.30.2

Re: [PATCH bpf-next] bpftool: remove useless #include to <perf-sys.h> from map_perf_ring.c

From: Andrii Nakryiko <hidden>
Date: 2021-10-20 17:48:17

On Wed, Oct 20, 2021 at 2:48 AM Quentin Monnet [off-list ref] wrote:
The header is no longer needed since the event_pipe implementation
was updated to rely on libbpf's perf_buffer. This makes bpftool free of
dependencies to perf files, and we can update the Makefile accordingly.

Fixes: 9b190f185d2f ("tools/bpftool: switch map event_pipe to libbpf's perf_buffer")
Signed-off-by: Quentin Monnet <redacted>
---

Great, thanks. It's in bpf-next.
quoted hunk
 tools/bpf/bpftool/Makefile        | 3 +--
 tools/bpf/bpftool/map_perf_ring.c | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index abcef1f72d65..098d762e111a 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -73,8 +73,7 @@ CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
        -I$(LIBBPF_INCLUDE) \
        -I$(srctree)/kernel/bpf/ \
        -I$(srctree)/tools/include \
-       -I$(srctree)/tools/include/uapi \
-       -I$(srctree)/tools/perf
+       -I$(srctree)/tools/include/uapi
 CFLAGS += -DBPFTOOL_VERSION='"$(BPFTOOL_VERSION)"'
 ifneq ($(EXTRA_CFLAGS),)
 CFLAGS += $(EXTRA_CFLAGS)
diff --git a/tools/bpf/bpftool/map_perf_ring.c b/tools/bpf/bpftool/map_perf_ring.c
index 825f29f93a57..b98ea702d284 100644
--- a/tools/bpf/bpftool/map_perf_ring.c
+++ b/tools/bpf/bpftool/map_perf_ring.c
@@ -22,7 +22,6 @@
 #include <sys/syscall.h>

 #include <bpf/bpf.h>
-#include <perf-sys.h>

 #include "main.h"

--
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help