perf bpf: Remove bpf/ subdir from bpf.h headers used to build bpf events
A message that is not in the archive (sent off-list or not yet received): [email protected]
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 3b573bf318d894b4290e194c4d7dbcba8c1f6ead Gitweb: https://git.kernel.org/tip/3b573bf318d894b4290e194c4d7dbcba8c1f6ead Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 14 Feb 2020 16:21:40 -03:00 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Tue, 18 Feb 2020 10:13:28 -03:00
perf bpf: Remove bpf/ subdir from bpf.h headers used to build bpf events
The bpf.h file needed gets installed in /usr/lib/include/perf/bpf/bpf.h, and /usr/lib/include/perf/ is added to the include path passed to clang to build the eBPF bytecode, so just remove "bpf/", its directly in the path passed already. This was working by accident, fix it.
I.e. now this is back working:
# cat /home/acme/git/perf/tools/perf/examples/bpf/hello.c #include <stdio.h>
int syscall_enter(openat)(void *args)
{
puts("Hello, world\n");
return 0;
}
license(GPL);
# perf trace -e /home/acme/git/perf/tools/perf/examples/bpf/hello.c
0.000 pickup/21493 __bpf_stdout__(Hello, world)
56.462 sh/13539 __bpf_stdout__(Hello, world)
56.536 sh/13539 __bpf_stdout__(Hello, world)
56.673 sh/13539 __bpf_stdout__(Hello, world)
56.781 sh/13539 __bpf_stdout__(Hello, world)
56.707 perf/13182 __bpf_stdout__(Hello, world)
56.849 perf/13182 __bpf_stdout__(Hello, world)
^C
#Cc Adrian Hunter <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/include/bpf/pid_filter.h | 2 +- tools/perf/include/bpf/stdio.h | 2 +- tools/perf/include/bpf/unistd.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/include/bpf/pid_filter.h +1 -1
@@ -3,7 +3,7 @@#ifndef _PERF_BPF_PID_FILTER_#define _PERF_BPF_PID_FILTER_ -#include <bpf/bpf.h> +#include <bpf.h> #define pid_filter (name) pid_map(name, bool)
tools/perf/include/bpf/stdio.h +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 -#include <bpf/bpf.h> +#include <bpf.h> struct bpf_map SEC("maps") __bpf_stdout__ = { .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY,
tools/perf/include/bpf/unistd.h +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: LGPL-2.1 -#include <bpf/bpf.h> +#include <bpf.h> static int (*bpf_get_current_pid_tgid)(void ) = (void *)BPF_FUNC_get_current_pid_tgid;