tracing: Clean ups for tracing filter for 3.17
Steven Rostedt
maintainerLinus,
Oleg Nesterov did several clean ups with the tracing filter code. As he found some small bugs that went into 3.16, and these changes were based on that, I had to apply his changes to a separate branch than my main development branch.
This was based on work that was already pulled into 3.16, and is a separate pull request to keep from having local merges in my pull request.
Please pull the latest trace-3.17-2 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-3.17-2
Tag SHA1: 53cf4ddf4de60141e6c01501eb736c1aca1a44ec Head SHA1: 6355d54438bfc3b636cb6453cd091f782fb9b4d7
Oleg Nesterov (7):
tracing: Kill destroy_preds() and destroy_file_preds()
tracing: Kill destroy_call_preds()
tracing: Kill call_filter_disable()
tracing/uprobes: Kill the dead TRACE_EVENT_FL_USE_CALL_FILTER logic
tracing: Kill ftrace_event_call->files
tracing: Change apply_subsystem_event_filter() paths to check file->system == dir
tracing: Kill "filter_string" arg of replace_preds()
----
include/linux/ftrace_event.h | 3 -- kernel/trace/trace_events.c | 4 +-- kernel/trace/trace_events_filter.c | 73 +++++++++----------------------------- kernel/trace/trace_uprobe.c | 3 +- 4 files changed, 19 insertions(+), 64 deletions(-)
---------------------------
include/linux/ftrace_event.h +0 -3
@@ -272,7 +272,6 @@ struct ftrace_event_call {struct trace_event event;const char *print_fmt;struct event_filter *filter; -struct list_head *files;void *mod;void *data;/*
@@ -404,8 +403,6 @@ enum event_trigger_type { ETT_EVENT_ENABLE = (1 << 3), }; -extern void destroy_preds (struct ftrace_event_file *file); -extern void destroy_call_preds (struct ftrace_event_call *call);extern int filter_match_preds (struct event_filter *filter,void *rec); extern int filter_check_discard(struct ftrace_event_file *file, void *rec,
kernel/trace/trace_events.c +2 -2
@@ -1621,7 +1621,6 @@ static void event_remove(struct ftrace_event_call *call)if (file->event_call != call)continue ;ftrace_event_enable_disable (file,0 ); -destroy_preds (file);/* * The do_for_each_event_file() is * a double loop. After finding the call for this
@@ -1749,7 +1748,8 @@ static void __trace_remove_event_call(struct ftrace_event_call *call) {event_remove (call);trace_destroy_fields (call); -destroy_call_preds (call); +free_event_filter (call->filter); + call->filter =NULL ; }static int probe_remove_event_call (struct ftrace_event_call *call)
kernel/trace/trace_events_filter.c +16 -57
187 lines not on this page · raw message
kernel/trace/trace_uprobe.c +1 -2
@@ -265,7 +265,6 @@ alloc_trace_uprobe(const char *group, const char *event, int nargs, bool is_ret)if (is_ret) tu->consumer.ret_handler = uretprobe_dispatcher;init_trace_uprobe_filter (&tu->filter); - tu->tp.call.flags |=TRACE_EVENT_FL_USE_CALL_FILTER ;return tu; error:
@@ -1292,7 +1291,7 @@ static int register_uprobe_event(struct trace_uprobe *tu)kfree (call->print_fmt);return -ENODEV ; } - call->flags =0 ; + call->class->reg = trace_uprobe_register; call->data = tu; ret =trace_add_event_call (call);