Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
	bpf@vger.kernel.org, netdev <netdev@vger.kernel.org>,
	Jiri Olsa <olsajiri@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	David Ahern <dsahern@kernel.org>,
	Juri Lelli <juri.lelli@gmail.com>,
	Breno Leitao <leitao@debian.org>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Gabriele Monaco <gmonaco@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH v2] tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix
Date: Fri, 9 May 2025 15:06:09 -0400	[thread overview]
Message-ID: <20250509150609.5cb7c7a8@gandalf.local.home> (raw)
In-Reply-To: <CAEf4BzZxDPpsTnger+UXL9wbrpK5gf_9YD2fD0VNA1nC7bcwUg@mail.gmail.com>

On Fri, 9 May 2025 11:27:22 -0700
Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote:

> > diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h b/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> > index aeef86b3da74..2bac14ef507f 100644
> > --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> > +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> > @@ -42,7 +42,7 @@ DECLARE_TRACE(bpf_testmod_test_nullable_bare,
> >
> >  struct sk_buff;
> >
> > -DECLARE_TRACE(bpf_testmod_test_raw_tp_null,
> > +DECLARE_TRACE(bpf_testmod_test_raw_null,  
> 
> here "raw_tp" is actually part of the name (we are testing raw
> tracepoints with NULL argument), so I'd suggest to not change it here,
> we'll just have trace_bpf_testmod_test_raw_tp_null_tp() below, however
> odd it might be looking :)

Thanks for letting me know.

> 
> >         TP_PROTO(struct sk_buff *skb),
> >         TP_ARGS(skb)
> >  );
> > diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> > index 3220f1d28697..fd40c1180b09 100644
> > --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> > +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> > @@ -413,7 +413,7 @@ bpf_testmod_test_read(struct file *file, struct kobject *kobj,
> >
> >         (void)bpf_testmod_test_arg_ptr_to_struct(&struct_arg1_2);
> >
> > -       (void)trace_bpf_testmod_test_raw_tp_null(NULL);
> > +       (void)trace_bpf_testmod_test_raw_null_tp(NULL);
> >
> >         bpf_testmod_test_struct_ops3();
> >
> > @@ -431,14 +431,14 @@ bpf_testmod_test_read(struct file *file, struct kobject *kobj,
> >         if (bpf_testmod_loop_test(101) > 100)
> >                 trace_bpf_testmod_test_read(current, &ctx);
> >
> > -       trace_bpf_testmod_test_nullable_bare(NULL);
> > +       trace_bpf_testmod_test_nullable_bare_tp(NULL);
> >
> >         /* Magic number to enable writable tp */
> >         if (len == 64) {
> >                 struct bpf_testmod_test_writable_ctx writable = {
> >                         .val = 1024,
> >                 };
> > -               trace_bpf_testmod_test_writable_bare(&writable);
> > +               trace_bpf_testmod_test_writable_bare_tp(&writable);
> >                 if (writable.early_ret)
> >                         return snprintf(buf, len, "%d\n", writable.val);
> >         }
> > @@ -470,7 +470,7 @@ bpf_testmod_test_write(struct file *file, struct kobject *kobj,
> >                 .len = len,
> >         };
> >
> > -       trace_bpf_testmod_test_write_bare(current, &ctx);
> > +       trace_bpf_testmod_test_write_bare_tp(current, &ctx);
> >  
> 
> please update the following three lines in selftests to match new names:

Will do.

Will put together a v3.

Thanks for the review!

-- Steve

> 
> progs/test_module_attach.c
> 22:SEC("raw_tp/bpf_testmod_test_write_bare")
> 
> progs/test_tp_btf_nullable.c
> 9:SEC("tp_btf/bpf_testmod_test_nullable_bare")
> 16:SEC("tp_btf/bpf_testmod_test_nullable_bare")
> 
> 
> just add that "_tp" suffix everywhere and CI should be happy
> 
> >         return -EIO; /* always fail */
> >  }
> > --
> > 2.47.2
> >  


      reply	other threads:[~2025-05-09 19:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 20:20 [PATCH v2] tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix Steven Rostedt
2025-05-09 18:27 ` Andrii Nakryiko
2025-05-09 19:06   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250509150609.5cb7c7a8@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=dsahern@kernel.org \
    --cc=gmonaco@redhat.com \
    --cc=juri.lelli@gmail.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olsajiri@gmail.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox