diff options
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r-- | include/trace/ftrace.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 52594b20179e..5c38606613d8 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -90,6 +90,10 @@ | |||
90 | #define TRACE_EVENT_FLAGS(name, value) \ | 90 | #define TRACE_EVENT_FLAGS(name, value) \ |
91 | __TRACE_EVENT_FLAGS(name, value) | 91 | __TRACE_EVENT_FLAGS(name, value) |
92 | 92 | ||
93 | #undef TRACE_EVENT_PERF_PERM | ||
94 | #define TRACE_EVENT_PERF_PERM(name, expr...) \ | ||
95 | __TRACE_EVENT_PERF_PERM(name, expr) | ||
96 | |||
93 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 97 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
94 | 98 | ||
95 | 99 | ||
@@ -140,6 +144,9 @@ | |||
140 | #undef TRACE_EVENT_FLAGS | 144 | #undef TRACE_EVENT_FLAGS |
141 | #define TRACE_EVENT_FLAGS(event, flag) | 145 | #define TRACE_EVENT_FLAGS(event, flag) |
142 | 146 | ||
147 | #undef TRACE_EVENT_PERF_PERM | ||
148 | #define TRACE_EVENT_PERF_PERM(event, expr...) | ||
149 | |||
143 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 150 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
144 | 151 | ||
145 | /* | 152 | /* |
@@ -372,7 +379,8 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ | |||
372 | __data_size += (len) * sizeof(type); | 379 | __data_size += (len) * sizeof(type); |
373 | 380 | ||
374 | #undef __string | 381 | #undef __string |
375 | #define __string(item, src) __dynamic_array(char, item, strlen(src) + 1) | 382 | #define __string(item, src) __dynamic_array(char, item, \ |
383 | strlen((src) ? (const char *)(src) : "(null)") + 1) | ||
376 | 384 | ||
377 | #undef DECLARE_EVENT_CLASS | 385 | #undef DECLARE_EVENT_CLASS |
378 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 386 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
@@ -501,7 +509,7 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
501 | 509 | ||
502 | #undef __assign_str | 510 | #undef __assign_str |
503 | #define __assign_str(dst, src) \ | 511 | #define __assign_str(dst, src) \ |
504 | strcpy(__get_str(dst), src); | 512 | strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)"); |
505 | 513 | ||
506 | #undef TP_fast_assign | 514 | #undef TP_fast_assign |
507 | #define TP_fast_assign(args...) args | 515 | #define TP_fast_assign(args...) args |