diff options
Diffstat (limited to 'kernel/trace/trace_export.c')
| -rw-r--r-- | kernel/trace/trace_export.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index 7c3e3e72e2b6..d4ddde28a81a 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
| @@ -95,15 +95,12 @@ static void __always_unused ____ftrace_check_##name(void) \ | |||
| 95 | #undef __array | 95 | #undef __array |
| 96 | #define __array(type, item, len) \ | 96 | #define __array(type, item, len) \ |
| 97 | do { \ | 97 | do { \ |
| 98 | char *type_str = #type"["__stringify(len)"]"; \ | ||
| 98 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ | 99 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ |
| 99 | mutex_lock(&event_storage_mutex); \ | 100 | ret = trace_define_field(event_call, type_str, #item, \ |
| 100 | snprintf(event_storage, sizeof(event_storage), \ | ||
| 101 | "%s[%d]", #type, len); \ | ||
| 102 | ret = trace_define_field(event_call, event_storage, #item, \ | ||
| 103 | offsetof(typeof(field), item), \ | 101 | offsetof(typeof(field), item), \ |
| 104 | sizeof(field.item), \ | 102 | sizeof(field.item), \ |
| 105 | is_signed_type(type), filter_type); \ | 103 | is_signed_type(type), filter_type); \ |
| 106 | mutex_unlock(&event_storage_mutex); \ | ||
| 107 | if (ret) \ | 104 | if (ret) \ |
| 108 | return ret; \ | 105 | return ret; \ |
| 109 | } while (0); | 106 | } while (0); |
| @@ -176,9 +173,11 @@ struct ftrace_event_class __refdata event_class_ftrace_##call = { \ | |||
| 176 | }; \ | 173 | }; \ |
| 177 | \ | 174 | \ |
| 178 | struct ftrace_event_call __used event_##call = { \ | 175 | struct ftrace_event_call __used event_##call = { \ |
| 179 | .name = #call, \ | ||
| 180 | .event.type = etype, \ | ||
| 181 | .class = &event_class_ftrace_##call, \ | 176 | .class = &event_class_ftrace_##call, \ |
| 177 | { \ | ||
| 178 | .name = #call, \ | ||
| 179 | }, \ | ||
| 180 | .event.type = etype, \ | ||
| 182 | .print_fmt = print, \ | 181 | .print_fmt = print, \ |
| 183 | .flags = TRACE_EVENT_FL_IGNORE_ENABLE | TRACE_EVENT_FL_USE_CALL_FILTER, \ | 182 | .flags = TRACE_EVENT_FL_IGNORE_ENABLE | TRACE_EVENT_FL_USE_CALL_FILTER, \ |
| 184 | }; \ | 183 | }; \ |
