Commit 3f78f935 authored by Jiri Olsa's avatar Jiri Olsa Committed by Steven Rostedt

tracing/filter: Simplify tracepoint event lookup

We dont need to perform lookup through the ftrace_events list,
instead we can use the 'tp_event' field.

Each perf_event contains tracepoint event field 'tp_event', which
got initialized during the tracepoint event initialization.
Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1313072754-4620-5-git-send-email-jolsa@redhat.comSigned-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 61aaef55
...@@ -1894,17 +1894,14 @@ int ftrace_profile_set_filter(struct perf_event *event, int event_id, ...@@ -1894,17 +1894,14 @@ int ftrace_profile_set_filter(struct perf_event *event, int event_id,
int err; int err;
struct event_filter *filter; struct event_filter *filter;
struct filter_parse_state *ps; struct filter_parse_state *ps;
struct ftrace_event_call *call = NULL; struct ftrace_event_call *call;
mutex_lock(&event_mutex); mutex_lock(&event_mutex);
list_for_each_entry(call, &ftrace_events, list) { call = event->tp_event;
if (call->event.type == event_id)
break;
}
err = -EINVAL; err = -EINVAL;
if (&call->list == &ftrace_events) if (!call)
goto out_unlock; goto out_unlock;
err = -EEXIST; err = -EEXIST;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment