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

Masami Hiramatsu
2025-07-11T01:44:41Z

On Thu, 10 Jul 2025 09:53:27 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Thu, 10 Jul 2025 22:45:20 +0900
> Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
>
> > > And it doesn't free after allocation because it only does the
> > > allocation for events that will never be freed. For modules, it
> > > registers the allocated string so it will be freed on unload.
> >
> > What happen if the tracepoint in module has the __attribute__?
> > (or enum etc?)
>
> It adds the string to a linked list via add_str_to_module(). When the
> module is unloaded, it searches the link list "module_strings" for all
> the strings registered under that module and frees it.

OK, thanks for the clarification!

>
> See trace_module_remove_events().

Let me check it.

Thanks!

>
> -- Steve

--
Masami Hiramatsu (Google) <mhiramat@kernel.org>