diff options
Diffstat (limited to 'kernel/trace/trace_export.c')
-rw-r--r-- | kernel/trace/trace_export.c | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index 4cb29d84d73a..2435d55947e6 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
@@ -23,6 +23,47 @@ | |||
23 | #define __field_struct(type, item) | 23 | #define __field_struct(type, item) |
24 | 24 | ||
25 | #undef __field | 25 | #undef __field |
26 | #define __field(type, item) type item; | ||
27 | |||
28 | #undef __field_desc | ||
29 | #define __field_desc(type, container, item) type item; | ||
30 | |||
31 | #undef __array | ||
32 | #define __array(type, item, size) type item[size]; | ||
33 | |||
34 | #undef __array_desc | ||
35 | #define __array_desc(type, container, item, size) type item[size]; | ||
36 | |||
37 | #undef __dynamic_array | ||
38 | #define __dynamic_array(type, item) type item[]; | ||
39 | |||
40 | #undef F_STRUCT | ||
41 | #define F_STRUCT(args...) args | ||
42 | |||
43 | #undef F_printk | ||
44 | #define F_printk(fmt, args...) fmt, args | ||
45 | |||
46 | #undef FTRACE_ENTRY | ||
47 | #define FTRACE_ENTRY(name, struct_name, id, tstruct, print) \ | ||
48 | struct ____ftrace_##name { \ | ||
49 | tstruct \ | ||
50 | }; \ | ||
51 | static void __used ____ftrace_check_##name(void) \ | ||
52 | { \ | ||
53 | struct ____ftrace_##name *__entry = NULL; \ | ||
54 | \ | ||
55 | /* force cmpile-time check on F_printk() */ \ | ||
56 | printk(print); \ | ||
57 | } | ||
58 | |||
59 | #undef FTRACE_ENTRY_DUP | ||
60 | #define FTRACE_ENTRY_DUP(name, struct_name, id, tstruct, print) \ | ||
61 | FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print)) | ||
62 | |||
63 | #include "trace_entries.h" | ||
64 | |||
65 | |||
66 | #undef __field | ||
26 | #define __field(type, item) \ | 67 | #define __field(type, item) \ |
27 | ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \ | 68 | ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \ |
28 | "offset:%zu;\tsize:%zu;\n", \ | 69 | "offset:%zu;\tsize:%zu;\n", \ |
@@ -88,10 +129,6 @@ ftrace_format_##name(struct ftrace_event_call *unused, \ | |||
88 | return ret; \ | 129 | return ret; \ |
89 | } | 130 | } |
90 | 131 | ||
91 | #undef FTRACE_ENTRY_DUP | ||
92 | #define FTRACE_ENTRY_DUP(name, struct_name, id, tstruct, print) \ | ||
93 | FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print)) | ||
94 | |||
95 | #include "trace_entries.h" | 132 | #include "trace_entries.h" |
96 | 133 | ||
97 | 134 | ||