diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-02-15 09:51:53 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-02-21 11:08:29 -0500 |
commit | 02aa3162edaa166a01d193f80ccde890be8b55da (patch) | |
tree | 50f111c12472e5573b966d7fb076ba4b22c86669 /kernel/trace/trace.h | |
parent | ced39002f5ea736b716ae233fb68b26d59783912 (diff) |
ftrace: Allow to specify filter field type for ftrace events
Adding FILTER_TRACE_FN event field type for function tracepoint
event, so it can be properly recognized within filtering code.
Currently all fields of ftrace subsystem events share the common
field type FILTER_OTHER. Since the function trace fields need
special care within the filtering code we need to recognize it
properly, hence adding the FILTER_TRACE_FN event type.
Adding filter parameter to the FTRACE_ENTRY macro, to specify the
filter field type for the event.
Link: http://lkml.kernel.org/r/1329317514-8131-7-git-send-email-jolsa@redhat.com
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 76a1c5094bbf..29f93cd434a5 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -56,21 +56,23 @@ enum trace_type { | |||
56 | #define F_STRUCT(args...) args | 56 | #define F_STRUCT(args...) args |
57 | 57 | ||
58 | #undef FTRACE_ENTRY | 58 | #undef FTRACE_ENTRY |
59 | #define FTRACE_ENTRY(name, struct_name, id, tstruct, print) \ | 59 | #define FTRACE_ENTRY(name, struct_name, id, tstruct, print, filter) \ |
60 | struct struct_name { \ | 60 | struct struct_name { \ |
61 | struct trace_entry ent; \ | 61 | struct trace_entry ent; \ |
62 | tstruct \ | 62 | tstruct \ |
63 | } | 63 | } |
64 | 64 | ||
65 | #undef TP_ARGS | 65 | #undef TP_ARGS |
66 | #define TP_ARGS(args...) args | 66 | #define TP_ARGS(args...) args |
67 | 67 | ||
68 | #undef FTRACE_ENTRY_DUP | 68 | #undef FTRACE_ENTRY_DUP |
69 | #define FTRACE_ENTRY_DUP(name, name_struct, id, tstruct, printk) | 69 | #define FTRACE_ENTRY_DUP(name, name_struct, id, tstruct, printk, filter) |
70 | 70 | ||
71 | #undef FTRACE_ENTRY_REG | 71 | #undef FTRACE_ENTRY_REG |
72 | #define FTRACE_ENTRY_REG(name, struct_name, id, tstruct, print, regfn) \ | 72 | #define FTRACE_ENTRY_REG(name, struct_name, id, tstruct, print, \ |
73 | FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print)) | 73 | filter, regfn) \ |
74 | FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \ | ||
75 | filter) | ||
74 | 76 | ||
75 | #include "trace_entries.h" | 77 | #include "trace_entries.h" |
76 | 78 | ||
@@ -826,12 +828,13 @@ extern const char *__start___trace_bprintk_fmt[]; | |||
826 | extern const char *__stop___trace_bprintk_fmt[]; | 828 | extern const char *__stop___trace_bprintk_fmt[]; |
827 | 829 | ||
828 | #undef FTRACE_ENTRY | 830 | #undef FTRACE_ENTRY |
829 | #define FTRACE_ENTRY(call, struct_name, id, tstruct, print) \ | 831 | #define FTRACE_ENTRY(call, struct_name, id, tstruct, print, filter) \ |
830 | extern struct ftrace_event_call \ | 832 | extern struct ftrace_event_call \ |
831 | __attribute__((__aligned__(4))) event_##call; | 833 | __attribute__((__aligned__(4))) event_##call; |
832 | #undef FTRACE_ENTRY_DUP | 834 | #undef FTRACE_ENTRY_DUP |
833 | #define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print) \ | 835 | #define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print, filter) \ |
834 | FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print)) | 836 | FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \ |
837 | filter) | ||
835 | #include "trace_entries.h" | 838 | #include "trace_entries.h" |
836 | 839 | ||
837 | #ifdef CONFIG_PERF_EVENTS | 840 | #ifdef CONFIG_PERF_EVENTS |