diff options
Diffstat (limited to 'kernel/trace/trace_export.c')
-rw-r--r-- | kernel/trace/trace_export.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index 31da218ee10f..934d81fb4ca4 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
@@ -134,7 +134,6 @@ ftrace_format_##name(struct ftrace_event_call *unused, \ | |||
134 | 134 | ||
135 | #include "trace_entries.h" | 135 | #include "trace_entries.h" |
136 | 136 | ||
137 | |||
138 | #undef __field | 137 | #undef __field |
139 | #define __field(type, item) \ | 138 | #define __field(type, item) \ |
140 | ret = trace_define_field(event_call, #type, #item, \ | 139 | ret = trace_define_field(event_call, #type, #item, \ |
@@ -196,6 +195,11 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call) \ | |||
196 | 195 | ||
197 | #include "trace_entries.h" | 196 | #include "trace_entries.h" |
198 | 197 | ||
198 | static int ftrace_raw_init_event(struct ftrace_event_call *call) | ||
199 | { | ||
200 | INIT_LIST_HEAD(&call->fields); | ||
201 | return 0; | ||
202 | } | ||
199 | 203 | ||
200 | #undef __field | 204 | #undef __field |
201 | #define __field(type, item) | 205 | #define __field(type, item) |
@@ -214,7 +218,6 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call) \ | |||
214 | 218 | ||
215 | #undef FTRACE_ENTRY | 219 | #undef FTRACE_ENTRY |
216 | #define FTRACE_ENTRY(call, struct_name, type, tstruct, print) \ | 220 | #define FTRACE_ENTRY(call, struct_name, type, tstruct, print) \ |
217 | static int ftrace_raw_init_event_##call(void); \ | ||
218 | \ | 221 | \ |
219 | struct ftrace_event_call __used \ | 222 | struct ftrace_event_call __used \ |
220 | __attribute__((__aligned__(4))) \ | 223 | __attribute__((__aligned__(4))) \ |
@@ -222,14 +225,9 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
222 | .name = #call, \ | 225 | .name = #call, \ |
223 | .id = type, \ | 226 | .id = type, \ |
224 | .system = __stringify(TRACE_SYSTEM), \ | 227 | .system = __stringify(TRACE_SYSTEM), \ |
225 | .raw_init = ftrace_raw_init_event_##call, \ | 228 | .raw_init = ftrace_raw_init_event, \ |
226 | .show_format = ftrace_format_##call, \ | 229 | .show_format = ftrace_format_##call, \ |
227 | .define_fields = ftrace_define_fields_##call, \ | 230 | .define_fields = ftrace_define_fields_##call, \ |
228 | }; \ | 231 | }; \ |
229 | static int ftrace_raw_init_event_##call(void) \ | ||
230 | { \ | ||
231 | INIT_LIST_HEAD(&event_##call.fields); \ | ||
232 | return 0; \ | ||
233 | } \ | ||
234 | 232 | ||
235 | #include "trace_entries.h" | 233 | #include "trace_entries.h" |