diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace_event.h | 2 | ||||
-rw-r--r-- | include/linux/syscalls.h | 2 | ||||
-rw-r--r-- | include/trace/ftrace.h | 133 | ||||
-rw-r--r-- | include/trace/syscall.h | 4 |
4 files changed, 6 insertions, 135 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index bd23d8e52f0..84a5629adfd 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -123,8 +123,6 @@ struct ftrace_event_call { | |||
123 | int id; | 123 | int id; |
124 | const char *print_fmt; | 124 | const char *print_fmt; |
125 | int (*raw_init)(struct ftrace_event_call *); | 125 | int (*raw_init)(struct ftrace_event_call *); |
126 | int (*show_format)(struct ftrace_event_call *, | ||
127 | struct trace_seq *); | ||
128 | int (*define_fields)(struct ftrace_event_call *); | 126 | int (*define_fields)(struct ftrace_event_call *); |
129 | struct list_head fields; | 127 | struct list_head fields; |
130 | int filter_active; | 128 | int filter_active; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index ed353d274a7..7b219696ad2 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -144,7 +144,6 @@ struct perf_event_attr; | |||
144 | .system = "syscalls", \ | 144 | .system = "syscalls", \ |
145 | .event = &enter_syscall_print_##sname, \ | 145 | .event = &enter_syscall_print_##sname, \ |
146 | .raw_init = init_syscall_trace, \ | 146 | .raw_init = init_syscall_trace, \ |
147 | .show_format = syscall_enter_format, \ | ||
148 | .define_fields = syscall_enter_define_fields, \ | 147 | .define_fields = syscall_enter_define_fields, \ |
149 | .regfunc = reg_event_syscall_enter, \ | 148 | .regfunc = reg_event_syscall_enter, \ |
150 | .unregfunc = unreg_event_syscall_enter, \ | 149 | .unregfunc = unreg_event_syscall_enter, \ |
@@ -166,7 +165,6 @@ struct perf_event_attr; | |||
166 | .system = "syscalls", \ | 165 | .system = "syscalls", \ |
167 | .event = &exit_syscall_print_##sname, \ | 166 | .event = &exit_syscall_print_##sname, \ |
168 | .raw_init = init_syscall_trace, \ | 167 | .raw_init = init_syscall_trace, \ |
169 | .show_format = syscall_exit_format, \ | ||
170 | .define_fields = syscall_exit_define_fields, \ | 168 | .define_fields = syscall_exit_define_fields, \ |
171 | .regfunc = reg_event_syscall_exit, \ | 169 | .regfunc = reg_event_syscall_exit, \ |
172 | .unregfunc = unreg_event_syscall_exit, \ | 170 | .unregfunc = unreg_event_syscall_exit, \ |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 3351d85c83a..df65b99880b 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -131,130 +131,6 @@ | |||
131 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 131 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
132 | 132 | ||
133 | /* | 133 | /* |
134 | * Setup the showing format of trace point. | ||
135 | * | ||
136 | * int | ||
137 | * ftrace_format_##call(struct trace_seq *s) | ||
138 | * { | ||
139 | * struct ftrace_raw_##call field; | ||
140 | * int ret; | ||
141 | * | ||
142 | * ret = trace_seq_printf(s, #type " " #item ";" | ||
143 | * " offset:%u; size:%u;\n", | ||
144 | * offsetof(struct ftrace_raw_##call, item), | ||
145 | * sizeof(field.type)); | ||
146 | * | ||
147 | * } | ||
148 | */ | ||
149 | |||
150 | #undef TP_STRUCT__entry | ||
151 | #define TP_STRUCT__entry(args...) args | ||
152 | |||
153 | #undef __field | ||
154 | #define __field(type, item) \ | ||
155 | ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \ | ||
156 | "offset:%u;\tsize:%u;\tsigned:%u;\n", \ | ||
157 | (unsigned int)offsetof(typeof(field), item), \ | ||
158 | (unsigned int)sizeof(field.item), \ | ||
159 | (unsigned int)is_signed_type(type)); \ | ||
160 | if (!ret) \ | ||
161 | return 0; | ||
162 | |||
163 | #undef __field_ext | ||
164 | #define __field_ext(type, item, filter_type) __field(type, item) | ||
165 | |||
166 | #undef __array | ||
167 | #define __array(type, item, len) \ | ||
168 | ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \ | ||
169 | "offset:%u;\tsize:%u;\tsigned:%u;\n", \ | ||
170 | (unsigned int)offsetof(typeof(field), item), \ | ||
171 | (unsigned int)sizeof(field.item), \ | ||
172 | (unsigned int)is_signed_type(type)); \ | ||
173 | if (!ret) \ | ||
174 | return 0; | ||
175 | |||
176 | #undef __dynamic_array | ||
177 | #define __dynamic_array(type, item, len) \ | ||
178 | ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\ | ||
179 | "offset:%u;\tsize:%u;\tsigned:%u;\n", \ | ||
180 | (unsigned int)offsetof(typeof(field), \ | ||
181 | __data_loc_##item), \ | ||
182 | (unsigned int)sizeof(field.__data_loc_##item), \ | ||
183 | (unsigned int)is_signed_type(type)); \ | ||
184 | if (!ret) \ | ||
185 | return 0; | ||
186 | |||
187 | #undef __string | ||
188 | #define __string(item, src) __dynamic_array(char, item, -1) | ||
189 | |||
190 | #undef __entry | ||
191 | #define __entry REC | ||
192 | |||
193 | #undef __print_symbolic | ||
194 | #undef __get_dynamic_array | ||
195 | #undef __get_str | ||
196 | |||
197 | #undef TP_printk | ||
198 | #define TP_printk(fmt, args...) "\"%s\", %s\n", fmt, __stringify(args) | ||
199 | |||
200 | #undef TP_fast_assign | ||
201 | #define TP_fast_assign(args...) args | ||
202 | |||
203 | #undef TP_perf_assign | ||
204 | #define TP_perf_assign(args...) | ||
205 | |||
206 | #undef DECLARE_EVENT_CLASS | ||
207 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ | ||
208 | static int \ | ||
209 | ftrace_format_setup_##call(struct ftrace_event_call *unused, \ | ||
210 | struct trace_seq *s) \ | ||
211 | { \ | ||
212 | struct ftrace_raw_##call field __attribute__((unused)); \ | ||
213 | int ret = 0; \ | ||
214 | \ | ||
215 | tstruct; \ | ||
216 | \ | ||
217 | return ret; \ | ||
218 | } \ | ||
219 | \ | ||
220 | static int \ | ||
221 | ftrace_format_##call(struct ftrace_event_call *unused, \ | ||
222 | struct trace_seq *s) \ | ||
223 | { \ | ||
224 | int ret = 0; \ | ||
225 | \ | ||
226 | ret = ftrace_format_setup_##call(unused, s); \ | ||
227 | if (!ret) \ | ||
228 | return ret; \ | ||
229 | \ | ||
230 | ret = trace_seq_printf(s, "\nprint fmt: " print); \ | ||
231 | \ | ||
232 | return ret; \ | ||
233 | } | ||
234 | |||
235 | #undef DEFINE_EVENT | ||
236 | #define DEFINE_EVENT(template, name, proto, args) | ||
237 | |||
238 | #undef DEFINE_EVENT_PRINT | ||
239 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ | ||
240 | static int \ | ||
241 | ftrace_format_##name(struct ftrace_event_call *unused, \ | ||
242 | struct trace_seq *s) \ | ||
243 | { \ | ||
244 | int ret = 0; \ | ||
245 | \ | ||
246 | ret = ftrace_format_setup_##template(unused, s); \ | ||
247 | if (!ret) \ | ||
248 | return ret; \ | ||
249 | \ | ||
250 | trace_seq_printf(s, "\nprint fmt: " print); \ | ||
251 | \ | ||
252 | return ret; \ | ||
253 | } | ||
254 | |||
255 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
256 | |||
257 | /* | ||
258 | * Stage 3 of the trace events. | 134 | * Stage 3 of the trace events. |
259 | * | 135 | * |
260 | * Override the macros in <trace/trace_events.h> to include the following: | 136 | * Override the macros in <trace/trace_events.h> to include the following: |
@@ -622,7 +498,6 @@ static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\ | |||
622 | * .raw_init = trace_event_raw_init, | 498 | * .raw_init = trace_event_raw_init, |
623 | * .regfunc = ftrace_reg_event_<call>, | 499 | * .regfunc = ftrace_reg_event_<call>, |
624 | * .unregfunc = ftrace_unreg_event_<call>, | 500 | * .unregfunc = ftrace_unreg_event_<call>, |
625 | * .show_format = ftrace_format_<call>, | ||
626 | * } | 501 | * } |
627 | * | 502 | * |
628 | */ | 503 | */ |
@@ -657,6 +532,12 @@ static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\ | |||
657 | #define __assign_str(dst, src) \ | 532 | #define __assign_str(dst, src) \ |
658 | strcpy(__get_str(dst), src); | 533 | strcpy(__get_str(dst), src); |
659 | 534 | ||
535 | #undef TP_fast_assign | ||
536 | #define TP_fast_assign(args...) args | ||
537 | |||
538 | #undef TP_perf_assign | ||
539 | #define TP_perf_assign(args...) | ||
540 | |||
660 | #undef DECLARE_EVENT_CLASS | 541 | #undef DECLARE_EVENT_CLASS |
661 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 542 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
662 | \ | 543 | \ |
@@ -750,7 +631,6 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
750 | .regfunc = ftrace_raw_reg_event_##call, \ | 631 | .regfunc = ftrace_raw_reg_event_##call, \ |
751 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 632 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
752 | .print_fmt = print_fmt_##template, \ | 633 | .print_fmt = print_fmt_##template, \ |
753 | .show_format = ftrace_format_##template, \ | ||
754 | .define_fields = ftrace_define_fields_##template, \ | 634 | .define_fields = ftrace_define_fields_##template, \ |
755 | _TRACE_PROFILE_INIT(call) \ | 635 | _TRACE_PROFILE_INIT(call) \ |
756 | } | 636 | } |
@@ -770,7 +650,6 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
770 | .regfunc = ftrace_raw_reg_event_##call, \ | 650 | .regfunc = ftrace_raw_reg_event_##call, \ |
771 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 651 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
772 | .print_fmt = print_fmt_##call, \ | 652 | .print_fmt = print_fmt_##call, \ |
773 | .show_format = ftrace_format_##call, \ | ||
774 | .define_fields = ftrace_define_fields_##template, \ | 653 | .define_fields = ftrace_define_fields_##template, \ |
775 | _TRACE_PROFILE_INIT(call) \ | 654 | _TRACE_PROFILE_INIT(call) \ |
776 | } | 655 | } |
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 961fda3556b..8cd41025445 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -34,10 +34,6 @@ struct syscall_metadata { | |||
34 | extern unsigned long arch_syscall_addr(int nr); | 34 | extern unsigned long arch_syscall_addr(int nr); |
35 | extern int init_syscall_trace(struct ftrace_event_call *call); | 35 | extern int init_syscall_trace(struct ftrace_event_call *call); |
36 | 36 | ||
37 | extern int syscall_enter_format(struct ftrace_event_call *call, | ||
38 | struct trace_seq *s); | ||
39 | extern int syscall_exit_format(struct ftrace_event_call *call, | ||
40 | struct trace_seq *s); | ||
41 | extern int syscall_enter_define_fields(struct ftrace_event_call *call); | 37 | extern int syscall_enter_define_fields(struct ftrace_event_call *call); |
42 | extern int syscall_exit_define_fields(struct ftrace_event_call *call); | 38 | extern int syscall_exit_define_fields(struct ftrace_event_call *call); |
43 | extern int reg_event_syscall_enter(struct ftrace_event_call *call); | 39 | extern int reg_event_syscall_enter(struct ftrace_event_call *call); |