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.desnoy...@efficios.com> > CC: Steven Rostedt <rost...@goodmis.org> > CC: Alexei Starovoitov <a...@kernel.org> > CC: Peter Zijlstra <pet...@infradead.org> > CC: Ingo Molnar <mi...@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.