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

From: Steven Rostedt
Date: Wed Jul 23 2025 - 10:41:35 EST


On Tue, 15 Jul 2025 19:56:02 +0900
"Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:

> +static void
> +trace_event_update_with_eval_map(struct module *mod,
> + struct trace_eval_map **start,
> + int len)
> {
> struct trace_eval_map **map;
>
> - if (len <= 0)
> - return;
> -
> map = start;
>
> - trace_event_eval_update(map, len);
> + /* This must run always for sanitizing. */
> + trace_event_update_all(map, len);
> +
> + if (len <= 0)
> + return;
>
> trace_insert_eval_map_file(mod, start, len);
> }

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.

What about having this be:

/* Always run sanitizer if PAHOLE_HAS_BTF_TAG is set */
if (!IS_ENABLED(CONFIG_PAHOLE_HAS_BTF_TAG) && len <= 0)
return;

map = start;

trace_event_update_all(map, len);

if (len <= 0)
return;

trace_insert_eval_map_file(mod, start, len);
}

-- Steve