diff options
author | Alan Maguire <alan.maguire@oracle.com> | 2020-07-13 13:52:33 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-07-14 01:55:49 +0200 |
commit | ac5a72ea5c8989871e61f6bb0852e0f91de51ebe (patch) | |
tree | dca6c9b98c6653937db455e2c6948e86e3274064 /kernel/trace/Makefile | |
parent | tools/bpftool: Remove warning about PID iterator support (diff) | |
download | linux-ac5a72ea5c8989871e61f6bb0852e0f91de51ebe.tar.xz linux-ac5a72ea5c8989871e61f6bb0852e0f91de51ebe.zip |
bpf: Use dedicated bpf_trace_printk event instead of trace_printk()
The bpf helper bpf_trace_printk() uses trace_printk() under the hood.
This leads to an alarming warning message originating from trace
buffer allocation which occurs the first time a program using
bpf_trace_printk() is loaded.
We can instead create a trace event for bpf_trace_printk() and enable
it in-kernel when/if we encounter a program using the
bpf_trace_printk() helper. With this approach, trace_printk()
is not used directly and no warning message appears.
This work was started by Steven (see Link) and finished by Alan; added
Steven's Signed-off-by with his permission.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/r/20200628194334.6238b933@oasis.local.home
Link: https://lore.kernel.org/bpf/1594641154-18897-2-git-send-email-alan.maguire@oracle.com
Diffstat (limited to 'kernel/trace/Makefile')
-rw-r--r-- | kernel/trace/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile index 6575bb0a0434..aeba5ee7325a 100644 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile @@ -31,6 +31,8 @@ ifdef CONFIG_GCOV_PROFILE_FTRACE GCOV_PROFILE := y endif +CFLAGS_bpf_trace.o := -I$(src) + CFLAGS_trace_benchmark.o := -I$(src) CFLAGS_trace_events_filter.o := -I$(src) |