aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-02-16 10:38:47 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-02-16 10:38:47 -0500
commit83f0d53993b2967e54186468b0fc4321447f68f1 (patch)
tree1e53910353eae38830e56199bc916caf4cd22362 /include/trace
parentc7c6b1fe9f942c1a30585ec2210a09dfff238506 (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/trace')
-rw-r--r--include/trace/ftrace.h31
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) \
202static enum print_line_t \ 202static notrace enum print_line_t \
203ftrace_raw_output_id_##call(int event_id, const char *name, \ 203ftrace_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) \
235static enum print_line_t \ 235static notrace enum print_line_t \
236ftrace_raw_output_##name(struct trace_iterator *iter, int flags) \ 236ftrace_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) \
244static enum print_line_t \ 244static notrace enum print_line_t \
245ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ 245ftrace_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) \
310static int \ 310static int notrace \
311ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ 311ftrace_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) \
358static inline int ftrace_get_offsets_##call( \ 358static 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 \
403static void ftrace_profile_##name(proto); \ 403static void ftrace_profile_##name(proto); \
404 \ 404 \
405static int ftrace_profile_enable_##name(struct ftrace_event_call *unused)\ 405static notrace int \
406ftrace_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 \
410static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\ 411static notrace void \
412ftrace_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 \
544static void ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \ 546static notrace void \
547ftrace_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 \
581static void ftrace_raw_event_##call(proto) \ 584static 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 \
586static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\ 589static notrace int \
590ftrace_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 \
591static void ftrace_raw_unreg_event_##call(struct ftrace_event_call *unused)\ 595static notrace void \
596ftrace_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) \
753static void \ 758static notrace void \
754ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ 759ftrace_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) \
823static void ftrace_profile_##call(proto) \ 828static 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 \