aboutsummaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2014-04-09 17:06:08 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-04-09 20:02:55 -0400
commitabb43f6998eb6466ea392d3757e673bbdb6ae171 (patch)
tree068d361c31e1d9e7668c19dbe6324523eac718f9 /include/trace
parentb725dfea24b89de672c055b34b22398283a3f4bc (diff)
tracing: Fix anonymous unions in struct ftrace_event_call
gcc <= 4.5.x has significant limitations with respect to initialization of anonymous unions within structures. They need to be surrounded by brackets, _and_ they need to be initialized in the same order in which they appear in the structure declaration. Link: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Link: http://lkml.kernel.org/r/1397077568-3156-1-git-send-email-mathieu.desnoyers@efficios.com Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/ftrace.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 9c44c11cd9b..0a1a4f7caf0 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -470,8 +470,10 @@ static inline notrace int ftrace_get_offsets_##call( \
* };
*
* static struct ftrace_event_call event_<call> = {
- * .tp = &__tracepoint_<call>,
* .class = event_class_<template>,
+ * {
+ * .tp = &__tracepoint_<call>,
+ * },
* .event = &ftrace_event_type_<call>,
* .print_fmt = print_fmt_<call>,
* .flags = TRACE_EVENT_FL_TRACEPOINT,
@@ -606,8 +608,10 @@ static struct ftrace_event_class __used __refdata event_class_##call = { \
#define DEFINE_EVENT(template, call, proto, args) \
\
static struct ftrace_event_call __used event_##call = { \
- .tp = &__tracepoint_##call, \
.class = &event_class_##template, \
+ { \
+ .tp = &__tracepoint_##call, \
+ }, \
.event.funcs = &ftrace_event_type_funcs_##template, \
.print_fmt = print_fmt_##template, \
.flags = TRACE_EVENT_FL_TRACEPOINT, \
@@ -621,8 +625,10 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
static const char print_fmt_##call[] = print; \
\
static struct ftrace_event_call __used event_##call = { \
- .tp = &__tracepoint_##call, \
.class = &event_class_##template, \
+ { \
+ .tp = &__tracepoint_##call, \
+ }, \
.event.funcs = &ftrace_event_type_funcs_##call, \
.print_fmt = print_fmt_##call, \
.flags = TRACE_EVENT_FL_TRACEPOINT, \