Messages in this thread | | | From | Andrii Nakryiko <> | Date | Fri, 10 Jul 2020 13:55:41 -0700 | Subject | Re: [PATCH v2 bpf-next 1/2] bpf: use dedicated bpf_trace_printk event instead of trace_printk() |
| |
On Fri, Jul 10, 2020 at 7:25 AM Alan Maguire <alan.maguire@oracle.com> wrote: > > 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. > > Link: https://lore.kernel.org/r/20200628194334.6238b933@oasis.local.home > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> > Signed-off-by: Alan Maguire <alan.maguire@oracle.com> > ---
LGTM.
Acked-by: Andrii Nakryiko <andriin@fb.com>
> kernel/trace/Makefile | 2 ++ > kernel/trace/bpf_trace.c | 41 ++++++++++++++++++++++++++++++++++++----- > kernel/trace/bpf_trace.h | 34 ++++++++++++++++++++++++++++++++++ > 3 files changed, 72 insertions(+), 5 deletions(-) > create mode 100644 kernel/trace/bpf_trace.h >
[...]
| |