Arnaldo Carvalho de Melo
301f0203e0
perf bpf examples: Fix bpf.h header include directive in 5sec.c example
It was looking at bpf/bpf.h, which caused this problem:
# perf trace -e tools/perf/examples/bpf/5sec.c
/home/acme/git/perf/tools/perf/examples/bpf/5sec.c:42:10: fatal error: 'bpf/bpf.h' file not found
#include <bpf/bpf.h>
^~~~~~~~~~~
1 error generated.
ERROR: unable to compile tools/perf/examples/bpf/5sec.c
Hint: Check error message shown above.
Hint: You can also pre-compile it into .o using:
clang -target bpf -O2 -c tools/perf/examples/bpf/5sec.c
with proper -I and -D options.
event syntax error: 'tools/perf/examples/bpf/5sec.c'
\___ Failed to load tools/perf/examples/bpf/5sec.c from source: Error when compiling BPF scriptlet
#
Change that to plain bpf.h, to make it work again:
# perf trace -e tools/perf/examples/bpf/5sec.c sleep 5s
0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1776891872, rqtp: 5000000000)
# perf trace -e tools/perf/examples/bpf/5sec.c/max-stack=16/ sleep 5s
0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1776891872, rqtp: 5000000000)
hrtimer_nanosleep ([kernel.kallsyms])
common_nsleep ([kernel.kallsyms])
__x64_sys_clock_nanosleep ([kernel.kallsyms])
do_syscall_64 ([kernel.kallsyms])
entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])
__clock_nanosleep_2 (/usr/lib64/libc-2.32.so)
# perf trace -e tools/perf/examples/bpf/5sec.c sleep 4s
#
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-01-15 16:31:46 -03:00
..
2020-12-24 09:24:20 -03:00
2020-11-12 17:55:41 -03:00
2020-12-19 17:52:24 -03:00
2021-01-15 16:31:46 -03:00
2020-02-18 10:13:28 -03:00
2020-05-29 16:51:38 -03:00
2020-12-17 14:36:17 -03:00
2020-12-08 23:30:04 +09:00
2020-09-23 12:58:53 -03:00
2020-12-24 10:05:28 -03:00
2020-12-24 09:24:19 -03:00
2020-11-30 15:01:08 -03:00
2020-12-24 10:52:10 -03:00
2020-03-25 11:50:48 +01:00
2020-11-30 15:00:12 -03:00
2020-10-13 10:59:42 -03:00
2020-10-14 08:46:22 -03:00
2020-11-11 12:27:06 -03:00
2020-08-06 09:43:37 -03:00
2020-11-30 15:18:48 -03:00
2020-12-17 14:36:17 -03:00
2020-11-30 14:56:52 -03:00
2020-11-30 08:56:55 -03:00
2020-11-30 09:48:07 -03:00
2020-11-30 15:15:30 -03:00
2020-09-09 11:12:10 -03:00
2020-11-12 17:55:41 -03:00
2020-12-19 17:53:29 -03:00
2020-05-28 10:03:24 -03:00
2020-12-17 14:36:16 -03:00
2020-12-17 14:36:17 -03:00
2020-11-30 09:48:07 -03:00
2020-12-19 17:04:39 -03:00
2020-12-24 10:05:25 -03:00
2020-05-28 10:03:27 -03:00
2020-11-30 15:15:30 -03:00
2020-11-30 15:15:30 -03:00
2020-11-04 09:42:40 -03:00
2020-12-24 09:24:20 -03:00
2020-04-16 12:19:08 -03:00
2020-03-06 17:08:28 -03:00
2020-11-03 08:24:54 -03:00
2020-11-11 12:18:22 -08:00
2020-01-06 11:46:09 -03:00
2020-09-10 11:55:37 -03:00