aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-10-14 23:21:42 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-15 05:35:23 -0400
commit6fb2915df7f0747d9044da9dbff5b46dc2e20830 (patch)
treeb4c5d7d913362ae6161c2859a7a385263330e965 /kernel/trace/trace.h
parentb0f1a59a98d7ac2102e7e4f22904c26d564a5628 (diff)
tracing/profile: Add filter support
- Add an ioctl to allocate a filter for a perf event. - Free the filter when the associated perf event is to be freed. - Do the filtering in perf_swevent_match(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <4AD69546.8050401@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index ffe53ddbe67a..4959ada9e0bb 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -743,7 +743,8 @@ filter_check_discard(struct ftrace_event_call *call, void *rec,
743 struct ring_buffer *buffer, 743 struct ring_buffer *buffer,
744 struct ring_buffer_event *event) 744 struct ring_buffer_event *event)
745{ 745{
746 if (unlikely(call->filter_active) && !filter_match_preds(call, rec)) { 746 if (unlikely(call->filter_active) &&
747 !filter_match_preds(call->filter, rec)) {
747 ring_buffer_discard_commit(buffer, event); 748 ring_buffer_discard_commit(buffer, event);
748 return 1; 749 return 1;
749 } 750 }