# Re: \[PATCH v6 bpf-next 07/11\] tracepoint: introduce kernel\_tracepoint\_find\_by\_name

- From: Mathieu Desnoyers \<mathieu.desnoyers@efficios.com\>
- Date: 2018-03-27 16:11:37 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2018/03/11086503
- Thread: https://ratatoskr.run/netdev/2018/03/11086408/t.md

```text
----- On Mar 27, 2018, at 11:53 AM, Alexei Starovoitov ast@fb.com wrote:

> On 3/27/18 7:42 AM, Steven Rostedt wrote:
>> On Tue, 27 Mar 2018 10:18:24 -0400 (EDT)
>> Mathieu Desnoyers [ref] wrote:
>>
>>> ----- On Mar 27, 2018, at 10:07 AM, rostedt rostedt@goodmis.org wrote:
>>>
>>>> On Mon, 26 Mar 2018 19:47:02 -0700
>>>> Alexei Starovoitov [ref] wrote:
>>>>
>>>>> From: Alexei Starovoitov <ast@kernel.org>
>>>>>
>>>>> introduce kernel_tracepoint_find_by_name() helper to let bpf core
>>>>> find tracepoint by name and later attach bpf probe to a tracepoint
>>>>>
>>>>> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
>>>>
>>>> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>>>
>>> Steven showed preference for tracepoint_kernel_find_by_name() at some
>>> point (starting with a tracepoint_ prefix). I'm find with either of
>>> the names.
>>
>> Yeah, I do prefer tracepoint_kernel_find_by_name() to stay consistent
>> with the other tracepoint functions. But we have
>> "for_each_kernel_tracepoint()" and not "for_each_tracepoint_kernel()",
>> thus we need to pick being consistent with one or the other. One answer
>> is to use tracpoint_kernel_find_by_name() and rename the for_each to
>> for_each_tracpoint_kernel().
> 
> yep. that's exactly the reason I picked kernel_tracepoint_find_by_name()
> to match for_each_kernel_tracepoint() naming.
> 
> I can certainly send a follow up patch to rename both to
> *tracepoint_kernel* and then you can nack it because it breaks lttng :)

If Steven prefers changing the name of for_each_kernel_tracepoint() to
for_each_tracepoint_kernel(), I'll adapt LTTng accordingly. I don't
mind either way, as long as the change is justified.

Thanks,

Mathieu


> but let's do it in a separate thread.
> 
> Daniel,
> do you mind adding { } as Steven requested while applying or
> you want me to resubmit the whole thing?
> 
> Thanks!

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
```
