aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/ftrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r--include/trace/ftrace.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index e718a917d897..e16610c208c9 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -296,13 +296,19 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \
296 296
297#undef __array 297#undef __array
298#define __array(type, item, len) \ 298#define __array(type, item, len) \
299 BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ 299 do { \
300 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, \
301 offsetof(typeof(field), item), \ 305 offsetof(typeof(field), item), \
302 sizeof(field.item), \ 306 sizeof(field.item), \
303 is_signed_type(type), FILTER_OTHER); \ 307 is_signed_type(type), FILTER_OTHER); \
304 if (ret) \ 308 mutex_unlock(&event_storage_mutex); \
305 return ret; 309 if (ret) \
310 return ret; \
311 } while (0);
306 312
307#undef __dynamic_array 313#undef __dynamic_array
308#define __dynamic_array(type, item, len) \ 314#define __dynamic_array(type, item, len) \