diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-02-16 10:38:47 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-02-16 10:38:47 -0500 |
commit | 83f0d53993b2967e54186468b0fc4321447f68f1 (patch) | |
tree | 1e53910353eae38830e56199bc916caf4cd22362 /include | |
parent | c7c6b1fe9f942c1a30585ec2210a09dfff238506 (diff) |
tracing: Add notrace to TRACE_EVENT implementation functions
The functions used to implement the TRACE_EVENT macro show up in
function tracing. This is considered a distraction, and these should
not be displayed. For example:
<idle>-0 [000] 57.202149: task_of <-update_stats_wait_end
<idle>-0 [000] 57.202149: ftrace_raw_event_sched_stat_wait <-update_stats_wait_end
<idle>-0 [000] 57.202150: ftrace_raw_event_id_sched_stat_template <-ftrace_raw_event_sched_stat_wait
<idle>-0 [000] 57.202150: sched_stat_wait: comm=sshd pid=2735 delay=19207 [ns]
The "ftrace_raw_event_*" traces are just the utility functions used
by TRACE_EVENT tracepoints.
Cc: Thomas Gleixner <tglx@linutronix.de>
Requested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/ftrace.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index df65b99880b1..09fd9afc0859 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -199,7 +199,7 @@ | |||
199 | 199 | ||
200 | #undef DECLARE_EVENT_CLASS | 200 | #undef DECLARE_EVENT_CLASS |
201 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 201 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
202 | static enum print_line_t \ | 202 | static notrace enum print_line_t \ |
203 | ftrace_raw_output_id_##call(int event_id, const char *name, \ | 203 | ftrace_raw_output_id_##call(int event_id, const char *name, \ |
204 | struct trace_iterator *iter, int flags) \ | 204 | struct trace_iterator *iter, int flags) \ |
205 | { \ | 205 | { \ |
@@ -232,7 +232,7 @@ ftrace_raw_output_id_##call(int event_id, const char *name, \ | |||
232 | 232 | ||
233 | #undef DEFINE_EVENT | 233 | #undef DEFINE_EVENT |
234 | #define DEFINE_EVENT(template, name, proto, args) \ | 234 | #define DEFINE_EVENT(template, name, proto, args) \ |
235 | static enum print_line_t \ | 235 | static notrace enum print_line_t \ |
236 | ftrace_raw_output_##name(struct trace_iterator *iter, int flags) \ | 236 | ftrace_raw_output_##name(struct trace_iterator *iter, int flags) \ |
237 | { \ | 237 | { \ |
238 | return ftrace_raw_output_id_##template(event_##name.id, \ | 238 | return ftrace_raw_output_id_##template(event_##name.id, \ |
@@ -241,7 +241,7 @@ ftrace_raw_output_##name(struct trace_iterator *iter, int flags) \ | |||
241 | 241 | ||
242 | #undef DEFINE_EVENT_PRINT | 242 | #undef DEFINE_EVENT_PRINT |
243 | #define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ | 243 | #define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ |
244 | static enum print_line_t \ | 244 | static notrace enum print_line_t \ |
245 | ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | 245 | ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ |
246 | { \ | 246 | { \ |
247 | struct trace_seq *s = &iter->seq; \ | 247 | struct trace_seq *s = &iter->seq; \ |
@@ -307,7 +307,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | |||
307 | 307 | ||
308 | #undef DECLARE_EVENT_CLASS | 308 | #undef DECLARE_EVENT_CLASS |
309 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ | 309 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ |
310 | static int \ | 310 | static int notrace \ |
311 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ | 311 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ |
312 | { \ | 312 | { \ |
313 | struct ftrace_raw_##call field; \ | 313 | struct ftrace_raw_##call field; \ |
@@ -355,7 +355,7 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ | |||
355 | 355 | ||
356 | #undef DECLARE_EVENT_CLASS | 356 | #undef DECLARE_EVENT_CLASS |
357 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 357 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
358 | static inline int ftrace_get_offsets_##call( \ | 358 | static inline notrace int ftrace_get_offsets_##call( \ |
359 | struct ftrace_data_offsets_##call *__data_offsets, proto) \ | 359 | struct ftrace_data_offsets_##call *__data_offsets, proto) \ |
360 | { \ | 360 | { \ |
361 | int __data_size = 0; \ | 361 | int __data_size = 0; \ |
@@ -402,12 +402,14 @@ static inline int ftrace_get_offsets_##call( \ | |||
402 | \ | 402 | \ |
403 | static void ftrace_profile_##name(proto); \ | 403 | static void ftrace_profile_##name(proto); \ |
404 | \ | 404 | \ |
405 | static int ftrace_profile_enable_##name(struct ftrace_event_call *unused)\ | 405 | static notrace int \ |
406 | ftrace_profile_enable_##name(struct ftrace_event_call *unused) \ | ||
406 | { \ | 407 | { \ |
407 | return register_trace_##name(ftrace_profile_##name); \ | 408 | return register_trace_##name(ftrace_profile_##name); \ |
408 | } \ | 409 | } \ |
409 | \ | 410 | \ |
410 | static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\ | 411 | static notrace void \ |
412 | ftrace_profile_disable_##name(struct ftrace_event_call *unused) \ | ||
411 | { \ | 413 | { \ |
412 | unregister_trace_##name(ftrace_profile_##name); \ | 414 | unregister_trace_##name(ftrace_profile_##name); \ |
413 | } | 415 | } |
@@ -541,7 +543,8 @@ static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\ | |||
541 | #undef DECLARE_EVENT_CLASS | 543 | #undef DECLARE_EVENT_CLASS |
542 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 544 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
543 | \ | 545 | \ |
544 | static void ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \ | 546 | static notrace void \ |
547 | ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \ | ||
545 | proto) \ | 548 | proto) \ |
546 | { \ | 549 | { \ |
547 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | 550 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ |
@@ -578,17 +581,19 @@ static void ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \ | |||
578 | #undef DEFINE_EVENT | 581 | #undef DEFINE_EVENT |
579 | #define DEFINE_EVENT(template, call, proto, args) \ | 582 | #define DEFINE_EVENT(template, call, proto, args) \ |
580 | \ | 583 | \ |
581 | static void ftrace_raw_event_##call(proto) \ | 584 | static notrace void ftrace_raw_event_##call(proto) \ |
582 | { \ | 585 | { \ |
583 | ftrace_raw_event_id_##template(&event_##call, args); \ | 586 | ftrace_raw_event_id_##template(&event_##call, args); \ |
584 | } \ | 587 | } \ |
585 | \ | 588 | \ |
586 | static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\ | 589 | static notrace int \ |
590 | ftrace_raw_reg_event_##call(struct ftrace_event_call *unused) \ | ||
587 | { \ | 591 | { \ |
588 | return register_trace_##call(ftrace_raw_event_##call); \ | 592 | return register_trace_##call(ftrace_raw_event_##call); \ |
589 | } \ | 593 | } \ |
590 | \ | 594 | \ |
591 | static void ftrace_raw_unreg_event_##call(struct ftrace_event_call *unused)\ | 595 | static notrace void \ |
596 | ftrace_raw_unreg_event_##call(struct ftrace_event_call *unused) \ | ||
592 | { \ | 597 | { \ |
593 | unregister_trace_##call(ftrace_raw_event_##call); \ | 598 | unregister_trace_##call(ftrace_raw_event_##call); \ |
594 | } \ | 599 | } \ |
@@ -750,7 +755,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
750 | 755 | ||
751 | #undef DECLARE_EVENT_CLASS | 756 | #undef DECLARE_EVENT_CLASS |
752 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 757 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
753 | static void \ | 758 | static notrace void \ |
754 | ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | 759 | ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ |
755 | proto) \ | 760 | proto) \ |
756 | { \ | 761 | { \ |
@@ -820,7 +825,7 @@ end_recursion: \ | |||
820 | 825 | ||
821 | #undef DEFINE_EVENT | 826 | #undef DEFINE_EVENT |
822 | #define DEFINE_EVENT(template, call, proto, args) \ | 827 | #define DEFINE_EVENT(template, call, proto, args) \ |
823 | static void ftrace_profile_##call(proto) \ | 828 | static notrace void ftrace_profile_##call(proto) \ |
824 | { \ | 829 | { \ |
825 | struct ftrace_event_call *event_call = &event_##call; \ | 830 | struct ftrace_event_call *event_call = &event_##call; \ |
826 | \ | 831 | \ |