Messages in this thread | | | Date | Fri, 11 Aug 2023 13:46:31 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH] tracing/eprobe: Iterate trace_eprobe directly |
| |
On Fri, 11 Aug 2023 10:51:02 +0900 Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> On Thu, 10 Aug 2023 19:32:04 +0900 > Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote: > > > On Thu, 10 Aug 2023 16:25:23 +0800 > > Chuang Wang <nashuiliang@gmail.com> wrote: > > > > > Refer to the description in [1], we can skip "container_of()" following > > > "list_for_each_entry()" by using "list_for_each_entry()" with > > > "struct trace_eprobe" and "tp.list". > > > > > > [1] https://lore.kernel.org/all/CAHk-=wjakjw6-rDzDDBsuMoDCqd+9ogifR_EE1F0K-jYek1CdA@mail.gmail.com/ > > > > > > > Good point. BTW, it is better to have 'for_each_eprobe(ep)' if it repeats 3 times. > > Wait, it is for each trace_eprobe on the trace_probe. > > #define for_each_trace_eprobe_on_trace_probe(ep, _tp) > list_for_each_entry(ep, trace_probe_probe_list(_tp), tp.list) >
Do we need it so verbose? Why can't it just be:
#define for_each_trace_eprobe(ep, tp)
If you are worried about consistency with the for_each_trace_kprobe() then let's call it:
#define for_each_trace_point_eprobe(ep, tp);
-- Steve
| |