diff options
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r-- | include/trace/ftrace.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 3a0b44bdabf7..360a77ad79e1 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -21,6 +21,9 @@ | |||
21 | #undef __field | 21 | #undef __field |
22 | #define __field(type, item) type item; | 22 | #define __field(type, item) type item; |
23 | 23 | ||
24 | #undef __field_ext | ||
25 | #define __field_ext(type, item, filter_type) type item; | ||
26 | |||
24 | #undef __array | 27 | #undef __array |
25 | #define __array(type, item, len) type item[len]; | 28 | #define __array(type, item, len) type item[len]; |
26 | 29 | ||
@@ -71,7 +74,10 @@ | |||
71 | */ | 74 | */ |
72 | 75 | ||
73 | #undef __field | 76 | #undef __field |
74 | #define __field(type, item); | 77 | #define __field(type, item) |
78 | |||
79 | #undef __field_ext | ||
80 | #define __field_ext(type, item, filter_type) | ||
75 | 81 | ||
76 | #undef __array | 82 | #undef __array |
77 | #define __array(type, item, len) | 83 | #define __array(type, item, len) |
@@ -119,6 +125,9 @@ | |||
119 | if (!ret) \ | 125 | if (!ret) \ |
120 | return 0; | 126 | return 0; |
121 | 127 | ||
128 | #undef __field_ext | ||
129 | #define __field_ext(type, item, filter_type) __field(type, item) | ||
130 | |||
122 | #undef __array | 131 | #undef __array |
123 | #define __array(type, item, len) \ | 132 | #define __array(type, item, len) \ |
124 | ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \ | 133 | ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \ |
@@ -274,28 +283,33 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | |||
274 | 283 | ||
275 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 284 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
276 | 285 | ||
277 | #undef __field | 286 | #undef __field_ext |
278 | #define __field(type, item) \ | 287 | #define __field_ext(type, item, filter_type) \ |
279 | ret = trace_define_field(event_call, #type, #item, \ | 288 | ret = trace_define_field(event_call, #type, #item, \ |
280 | offsetof(typeof(field), item), \ | 289 | offsetof(typeof(field), item), \ |
281 | sizeof(field.item), is_signed_type(type)); \ | 290 | sizeof(field.item), \ |
291 | is_signed_type(type), filter_type); \ | ||
282 | if (ret) \ | 292 | if (ret) \ |
283 | return ret; | 293 | return ret; |
284 | 294 | ||
295 | #undef __field | ||
296 | #define __field(type, item) __field_ext(type, item, FILTER_OTHER) | ||
297 | |||
285 | #undef __array | 298 | #undef __array |
286 | #define __array(type, item, len) \ | 299 | #define __array(type, item, len) \ |
287 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ | 300 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ |
288 | ret = trace_define_field(event_call, #type "[" #len "]", #item, \ | 301 | ret = trace_define_field(event_call, #type "[" #len "]", #item, \ |
289 | offsetof(typeof(field), item), \ | 302 | offsetof(typeof(field), item), \ |
290 | sizeof(field.item), 0); \ | 303 | sizeof(field.item), 0, FILTER_OTHER); \ |
291 | if (ret) \ | 304 | if (ret) \ |
292 | return ret; | 305 | return ret; |
293 | 306 | ||
294 | #undef __dynamic_array | 307 | #undef __dynamic_array |
295 | #define __dynamic_array(type, item, len) \ | 308 | #define __dynamic_array(type, item, len) \ |
296 | ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \ | 309 | ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \ |
297 | offsetof(typeof(field), __data_loc_##item), \ | 310 | offsetof(typeof(field), __data_loc_##item), \ |
298 | sizeof(field.__data_loc_##item), 0); | 311 | sizeof(field.__data_loc_##item), 0, \ |
312 | FILTER_OTHER); | ||
299 | 313 | ||
300 | #undef __string | 314 | #undef __string |
301 | #define __string(item, src) __dynamic_array(char, item, -1) | 315 | #define __string(item, src) __dynamic_array(char, item, -1) |
@@ -329,6 +343,9 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ | |||
329 | #undef __field | 343 | #undef __field |
330 | #define __field(type, item) | 344 | #define __field(type, item) |
331 | 345 | ||
346 | #undef __field_ext | ||
347 | #define __field_ext(type, item, filter_type) | ||
348 | |||
332 | #undef __array | 349 | #undef __array |
333 | #define __array(type, item, len) | 350 | #define __array(type, item, len) |
334 | 351 | ||