aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-04-28 04:04:47 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-29 08:05:54 -0400
commit30e673b230f9d556eb81ef68a7b1a08c8b3b142c (patch)
tree219bb8cfce0b36f05e3c21ab10a29f8f56d47d7e /kernel/trace/trace.h
parent0f9a623dd6c9b5b4dd00c232f29525bfc7a8ecf2 (diff)
tracing/filters: move preds into event_filter object
Create a new event_filter object, and move the pred-related members out of the call and subsystem objects and into the filter object - the details of the filter implementation don't need to be exposed in the call and subsystem in any case, and it will also help make the new parser implementation a little cleaner. [ Impact: refactor trace-filter code to prepare for new features ] Signed-off-by: Tom Zanussi <tzanussi@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: fweisbec@gmail.com Cc: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <1240905887.6416.119.camel@tropicana> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 7d55bcf50e4..1fb7d6ccadf 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -731,12 +731,16 @@ struct ftrace_event_field {
731 int size; 731 int size;
732}; 732};
733 733
734struct event_filter {
735 int n_preds;
736 struct filter_pred **preds;
737};
738
734struct event_subsystem { 739struct event_subsystem {
735 struct list_head list; 740 struct list_head list;
736 const char *name; 741 const char *name;
737 struct dentry *entry; 742 struct dentry *entry;
738 int n_preds; 743 void *filter;
739 struct filter_pred **preds;
740}; 744};
741 745
742struct filter_pred; 746struct filter_pred;
@@ -774,7 +778,7 @@ filter_check_discard(struct ftrace_event_call *call, void *rec,
774 struct ring_buffer *buffer, 778 struct ring_buffer *buffer,
775 struct ring_buffer_event *event) 779 struct ring_buffer_event *event)
776{ 780{
777 if (unlikely(call->n_preds) && !filter_match_preds(call, rec)) { 781 if (unlikely(call->filter_active) && !filter_match_preds(call, rec)) {
778 ring_buffer_discard_commit(buffer, event); 782 ring_buffer_discard_commit(buffer, event);
779 return 1; 783 return 1;
780 } 784 }