[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251021154737.77377790@gandalf.local.home>
Date: Tue, 21 Oct 2025 15:47:37 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Nicolas Schier <nsc@...nel.org>
Cc: Steven Rostedt <rostedt@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org, Masami
Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
<akpm@...ux-foundation.org>, Arnd Bergmann <arnd@...db.de>, Masahiro Yamada
<masahiroy@...nel.org>, Nathan Chancellor <nathan@...nel.org>, Nick
Desaulniers <nick.desaulniers+lkml@...il.com>, Catalin Marinas
<catalin.marinas@....com>, Linus Torvalds <torvalds@...ux-foundation.org>,
Randy Dunlap <rdunlap@...radead.org>, Stephen Rothwell
<sfr@...b.auug.org.au>
Subject: Re: [PATCH v9 2/4] tracing: Add a tracepoint verification check at
build time
On Fri, 17 Oct 2025 22:15:20 +0200
Nicolas Schier <nsc@...nel.org> wrote:
> > +# To check for unused tracepoints (tracepoints that are defined but never
> > +# called), run with:
> > +#
> > +# make UT=1
> > +#
> > +# Each unused tracepoints can take up to 5KB of memory in the running kernel.
> > +# It is best to remove any that are not used.
> > +
> > +ifeq ("$(origin UT)", "command line")
> > + WARN_ON_UNUSED_TRACEPOINTS := $(UT)
> > +endif
> > +
> > +export WARN_ON_UNUSED_TRACEPOINTS
>
> Is there a special reason why you chose to introduce a new command-line
> variable instead of extending KBUILD_EXTRA_WARN / W ?
Honestly, I didn't think about using KBUILD_EXTRA_WARN. I also want this
option to go away after we remove the current unused tracepoints so that
any new ones will always cause a warning.
The only reason not to make it always warn is because I don't want to add
warnings for the existing code. I'm working on having outreachy projects to
remove the currently unused tracepoints. Once that is done, then this
option is going to go away and the build will always warn on unused
tracepoints.
I thought it might be easier to remove it without any issues if it's a new
command line that goes away in the future.
Looking at EXTRA_WARN, it appears to be for basic issues with the code and
adds new C compiler warning flags. This isn't exactly the same.
If you think it makes sense to extend EXTRA_WARN, I can still go ahead and
do that.
-- Steve
Powered by blists - more mailing lists