Messages in this thread | | | Date | Mon, 26 Mar 2018 13:48:36 -0700 | From | Alexei Starovoitov <> | Subject | Re: [RFC PATCH] tracepoint: Provide tracepoint_kernel_find_by_name |
| |
On Mon, Mar 26, 2018 at 03:10:31PM -0400, Mathieu Desnoyers wrote: > Provide an API allowing eBPF to lookup core kernel tracepoints by name. > > Given that a lookup by name explicitly requires tracepoint definitions > to be unique for a given name (no duplicate keys), include a > WARN_ON_ONCE() check that only a single match is encountered at runtime. > This should always be the case, given that a DEFINE_TRACE emits a > __tracepoint_##name symbol, which would cause a link-time error if more > than one instance is found. Nevertheless, check this at runtime with > WARN_ON_ONCE() to stay on the safe side. > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > CC: Steven Rostedt <rostedt@goodmis.org> > CC: Alexei Starovoitov <ast@kernel.org> > CC: Peter Zijlstra <peterz@infradead.org> > CC: Ingo Molnar <mingo@kernel.org>
Mathieu, that's not enough. Commit log is also wrong. It needs to state that something like this is needed only because changing for_each_tracepoint_range() semantics will break lttng. I'll post a follow up patch shortly.
| |