Re: [RFC][PATCH] tracepoints: Add verifier that makes sure all defined tracepoints are used

From: Steven Rostedt
Date: Tue Jun 10 2025 - 09:26:47 EST


On Tue, 10 Jun 2025 14:53:05 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> >
> > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> > index fa5f19b8d53a..600d8b51e315 100644
> > --- a/include/asm-generic/vmlinux.lds.h
> > +++ b/include/asm-generic/vmlinux.lds.h
> > @@ -708,6 +708,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
> > MCOUNT_REC() \
> > *(.init.rodata .init.rodata.*) \
> > FTRACE_EVENTS() \
> > + BOUNDED_SECTION_BY(__tracepoint_check, ___tracepoint_check) \
>
> nit: Shouldn't we also make this as TRACEPOINT_CHECKS() ?
>
> Others looks good to me.
>
> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

In my "build time check" it requires these to be there even if it's not
used. It's how it determines if it's not used by seeing if this section is
empty.

So I need it not to be an option.

-- Steve