mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Steven Rostedt <rostedt@kernel.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org, llvm@lists.linux.dev,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas.schier@linux.dev>,
	Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH v4 1/4] tracing: sorttable: Add a tracepoint verification check at build time
Date: Wed, 23 Jul 2025 18:47:40 -0400	[thread overview]
Message-ID: <20250723184740.6dd2b2fc@gandalf.local.home> (raw)
In-Reply-To: <CAHk-=wgQA+kGVKaUqSGenXVZHaPFkuojb7MgJKVetsXZnLMFuQ@mail.gmail.com>

On Wed, 23 Jul 2025 15:33:16 -0700
Linus Torvalds <torvalds@linux-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

  reply	other threads:[~2025-07-23 22:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 19:41 [PATCH v4 0/4] tracepoints: Add warnings for unused tracepoints and trace events Steven Rostedt
2025-07-23 19:41 ` [PATCH v4 1/4] tracing: sorttable: Add a tracepoint verification check at build time Steven Rostedt
2025-07-23 20:31   ` Linus Torvalds
2025-07-23 22:27     ` Steven Rostedt
2025-07-23 22:33       ` Linus Torvalds
2025-07-23 22:47         ` Steven Rostedt [this message]
2025-07-23 22:33       ` Steven Rostedt
2025-07-23 19:41 ` [PATCH v4 2/4] tracing: sorttable: Find unused tracepoints for arm64 that uses reloc for address Steven Rostedt
2025-07-23 19:41 ` [PATCH v4 3/4] tracepoint: Do not warn for unused event that is exported Steven Rostedt
2025-07-23 19:41 ` [PATCH v4 4/4] tracing: Call trace_ftrace_test_filter() for the event Steven Rostedt

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=20250723184740.6dd2b2fc@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=nicolas.schier@linux.dev \
    --cc=rostedt@kernel.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®