Skip to content
Snippets Groups Projects
Commit 49c17746 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

tracing: Add __used annotation to event variable


The TRACE_EVENT() macros automate creation of trace events. To automate
initialization, the set up variables are loaded in a special section
that is read on boot up. GCC is not aware that these static variables
are used and will complain about them if we do not inform GCC that
they are indeed used.

One of the declarations of the event element was missing a __used
annotation. This patch adds it.

Reported-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 87f44bbc
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
#undef DEFINE_EVENT #undef DEFINE_EVENT
#define DEFINE_EVENT(template, name, proto, args) \ #define DEFINE_EVENT(template, name, proto, args) \
static struct ftrace_event_call \ static struct ftrace_event_call __used \
__attribute__((__aligned__(4))) event_##name __attribute__((__aligned__(4))) event_##name
#undef DEFINE_EVENT_PRINT #undef DEFINE_EVENT_PRINT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment