Re: [PATCH v3 1/1] tracing: Remove "__attribute__()" from the type field of event format

From: Steven Rostedt
Date: Wed Jul 23 2025 - 11:23:45 EST


On Thu, 24 Jul 2025 00:18:06 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> > So this will add more work during boot up as it is processed on every
> > event regardless if it has an eval map or not. But this is only needed
> > if CONFIG_DEBUG_INFO_BTF=y and PAHOLE_HAS_BTF_TAG=y is enabled.
>
> Hmm, In this case can we check it in trace_event_update_all()?
> If we need to sanitize more word, it is easier to add a condition
> there.

If we need to sanitize more words later, then we can open it up to
more. But why do this work when it's not needed. We are going from
calling this function a 100 times to calling it a 1000 times. That's an
order of magnitude, and I'm not sure we want to do that if it's not
needed.

>
> Or, maybe we can sanitize it while building the kernel as a part
> of post build process.

Ideally, that would be best, but parsing the elf file isn't trivial.

I would say let's just add this conditional for now, and then we can
start working on a way to parse all of this at build time.

-- Steve