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

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


On Tue, 2020-02-18 at 22:26 -0500, Steven Rostedt wrote:
> On Tue, 18 Feb 2020 19:09:10 -0800
> Joe Perches <joe@xxxxxxxxxxx> wrote:
>
> > 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.
>
> Yes, that should probably get changed. That's a leftover when we just
> called everything "ftrace", but it should have been changed when I
> renamed the file from ftrace.h to trace_event.h.

Pick a name.

btw: it's not used in an x86-64 allmodconfig or defconfig
as an actual separate section as far as I tell.

$ git grep _ftrace_events
include/asm-generic/vmlinux.lds.h: __start_ftrace_events = .; \
include/asm-generic/vmlinux.lds.h: KEEP(*(_ftrace_events)) \
include/asm-generic/vmlinux.lds.h: __stop_ftrace_events = .; \
include/linux/syscalls.h: __attribute__((section("_ftrace_events"))) \
include/linux/syscalls.h: __attribute__((section("_ftrace_events"))) \
include/trace/trace_events.h: * __section(_ftrace_events) *__event_<call> = &event_<call>;
include/trace/trace_events.h:static struct trace_event_call __used __section(_ftrace_events) \
include/trace/trace_events.h:static struct trace_event_call __used __section(_ftrace_events) \
kernel/module.c: mod->trace_events = section_objs(info, "_ftrace_events",
kernel/trace/trace_events.c:extern struct trace_event_call *__start_ftrace_events[];
kernel/trace/trace_events.c:extern struct trace_event_call *__stop_ftrace_events[];
kernel/trace/trace_events.c: for_each_event(iter, __start_ftrace_events, __stop_ftrace_events) {
kernel/trace/trace_export.c:static struct trace_event_call * __used __section(_ftrace_events) \