Re: [RFC PATCH 0/2] trace: Move trace data to new section _ftrace_data

From: Joe Perches
Date: Tue Feb 18 2020 - 22:10:36 EST


On Tue, 2020-02-18 at 21:53 -0500, Steven Rostedt wrote:
> On Tue, 18 Feb 2020 18:03:16 -0800
> Joe Perches <joe@xxxxxxxxxxx> wrote:
>
> > Move the trace data to a separate section to make it easier to
> > examine the amount of actual data in an object file.
>
> Not that I'm against this patch set, but can you elaborate more on
> "make it easier to examine the amount of actual data in an object file".

size -A <object> would now show each section of an
object file separating normal data from trace data.

It makes it easier to identify data that could be const like
https://lore.kernel.org/lkml/60559197a1af9e0af7f329cc3427989e5756846f.camel@xxxxxxxxxxx/

> Also, don't use "_ftrace" as the section name. "ftrace" should be
> reserved for the function hook part of tracing, which trace events do
> not apply to. "_trace_event_data" would be more appropriate.

I don't care about the section name at all.

I used that name for consistency with _ftrace_event
in the same file.
Perhaps the _ftrace_event section
name could be renamed to something
intelligible too.