diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-07-19 22:20:53 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-07-20 13:29:19 -0400 |
commit | 1f9963cbb0280e0cd554161e00f1a0eeddbf1ae1 (patch) | |
tree | 80e27aa2cf5401fc04f7dbb806ad7e0ec04b6e8c /include/linux/ftrace_event.h | |
parent | ff4e9da2330beb8d64498a513d3f9694e941b01a (diff) |
tracing/filters: improve subsystem filter
Currently a subsystem filter should be applicable to all events
under the subsystem, and if it failed, all the event filters
will be cleared. Those behaviors make subsys filter much less
useful:
# echo 'vec == 1' > irq/softirq_entry/filter
# echo 'irq == 5' > irq/filter
bash: echo: write error: Invalid argument
# cat irq/softirq_entry/filter
none
I'd expect it set the filter for irq_handler_entry/exit, and
not touch softirq_entry/exit.
The basic idea is, try to see if the filter can be applied
to which events, and then just apply to the those events:
# echo 'vec == 1' > softirq_entry/filter
# echo 'irq == 5' > filter
# cat irq_handler_entry/filter
irq == 5
# cat softirq_entry/filter
vec == 1
Changelog for v2:
- do some cleanups to address Frederic's comments.
Inspired-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A63D485.7030703@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r-- | include/linux/ftrace_event.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 5c093ffc655b..26d3673d5143 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -101,6 +101,8 @@ void trace_current_buffer_discard_commit(struct ring_buffer_event *event); | |||
101 | 101 | ||
102 | void tracing_record_cmdline(struct task_struct *tsk); | 102 | void tracing_record_cmdline(struct task_struct *tsk); |
103 | 103 | ||
104 | struct event_filter; | ||
105 | |||
104 | struct ftrace_event_call { | 106 | struct ftrace_event_call { |
105 | struct list_head list; | 107 | struct list_head list; |
106 | char *name; | 108 | char *name; |
@@ -116,7 +118,7 @@ struct ftrace_event_call { | |||
116 | int (*define_fields)(void); | 118 | int (*define_fields)(void); |
117 | struct list_head fields; | 119 | struct list_head fields; |
118 | int filter_active; | 120 | int filter_active; |
119 | void *filter; | 121 | struct event_filter *filter; |
120 | void *mod; | 122 | void *mod; |
121 | 123 | ||
122 | #ifdef CONFIG_EVENT_PROFILE | 124 | #ifdef CONFIG_EVENT_PROFILE |