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>
This commit is contained in:
@@ -731,12 +731,16 @@ struct ftrace_event_field {
|
||||
int size;
|
||||
};
|
||||
|
||||
struct event_filter {
|
||||
int n_preds;
|
||||
struct filter_pred **preds;
|
||||
};
|
||||
|
||||
struct event_subsystem {
|
||||
struct list_head list;
|
||||
const char *name;
|
||||
struct dentry *entry;
|
||||
int n_preds;
|
||||
struct filter_pred **preds;
|
||||
void *filter;
|
||||
};
|
||||
|
||||
struct filter_pred;
|
||||
@@ -774,7 +778,7 @@ filter_check_discard(struct ftrace_event_call *call, void *rec,
|
||||
struct ring_buffer *buffer,
|
||||
struct ring_buffer_event *event)
|
||||
{
|
||||
if (unlikely(call->n_preds) && !filter_match_preds(call, rec)) {
|
||||
if (unlikely(call->filter_active) && !filter_match_preds(call, rec)) {
|
||||
ring_buffer_discard_commit(buffer, event);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user