diff options
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r-- | include/trace/ftrace.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index a9377c0083ad..e16610c208c9 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -82,6 +82,10 @@ | |||
82 | TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \ | 82 | TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \ |
83 | PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \ | 83 | PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \ |
84 | 84 | ||
85 | #undef TRACE_EVENT_FLAGS | ||
86 | #define TRACE_EVENT_FLAGS(name, value) \ | ||
87 | __TRACE_EVENT_FLAGS(name, value) | ||
88 | |||
85 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 89 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
86 | 90 | ||
87 | 91 | ||
@@ -129,6 +133,9 @@ | |||
129 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ | 133 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ |
130 | DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args)) | 134 | DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args)) |
131 | 135 | ||
136 | #undef TRACE_EVENT_FLAGS | ||
137 | #define TRACE_EVENT_FLAGS(event, flag) | ||
138 | |||
132 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 139 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
133 | 140 | ||
134 | /* | 141 | /* |
@@ -289,13 +296,19 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ | |||
289 | 296 | ||
290 | #undef __array | 297 | #undef __array |
291 | #define __array(type, item, len) \ | 298 | #define __array(type, item, len) \ |
292 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ | 299 | do { \ |
293 | ret = trace_define_field(event_call, #type "[" #len "]", #item, \ | 300 | mutex_lock(&event_storage_mutex); \ |
301 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ | ||
302 | snprintf(event_storage, sizeof(event_storage), \ | ||
303 | "%s[%d]", #type, len); \ | ||
304 | ret = trace_define_field(event_call, event_storage, #item, \ | ||
294 | offsetof(typeof(field), item), \ | 305 | offsetof(typeof(field), item), \ |
295 | sizeof(field.item), \ | 306 | sizeof(field.item), \ |
296 | is_signed_type(type), FILTER_OTHER); \ | 307 | is_signed_type(type), FILTER_OTHER); \ |
297 | if (ret) \ | 308 | mutex_unlock(&event_storage_mutex); \ |
298 | return ret; | 309 | if (ret) \ |
310 | return ret; \ | ||
311 | } while (0); | ||
299 | 312 | ||
300 | #undef __dynamic_array | 313 | #undef __dynamic_array |
301 | #define __dynamic_array(type, item, len) \ | 314 | #define __dynamic_array(type, item, len) \ |