[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250723184740.6dd2b2fc@gandalf.local.home>
Date: Wed, 23 Jul 2025 18:47:40 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Steven Rostedt <rostedt@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
llvm@...ts.linux.dev, 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>, Nicolas Schier <nicolas.schier@...ux.dev>, Nick
Desaulniers <nick.desaulniers+lkml@...il.com>, Catalin Marinas
<catalin.marinas@....com>
Subject: Re: [PATCH v4 1/4] tracing: sorttable: Add a tracepoint
verification check at build time
On Wed, 23 Jul 2025 15:33:16 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> > I could probably take some of the sorttable.c elf parsing and move that
> > into a header that would share the code.
>
> Hmm. Why not just make sorttable then use vmlinux.o?
>
> No need to do it twice. Can't you just work on the original object
> file before re-linking?
I believe the sorttable code needs vmlinux to be finished linked, otherwise
it needs to handle all the relocations in vmlinux.o
$ readelf -r vmlinux
There are no relocations in this file.
Compared to:
$ readelf -r vmlinux.o| wc -l
22449337
But we are looking at moving the fix-ups of the event format files from
boot time into build time. That is, currently at boot, the enum strings
are converted to their numbers and some expanded tags from PAHOLE_TAG gets
removed from the format files to not confuse the parsers.
The sorttable.c should be just that, code to sort Linux tables. I think
adding the tracepoint check to it was a bit of a hack. Perhaps it should
have its own program that focuses on tracepoint changes.
Thus it could find unused trace points and fix up the format strings. I'm
not sure how bad the relocations not being resolved will affect that though.
-- Steve
Powered by blists - more mailing lists