Skip to content

Commit

Permalink
tracing/uprobes: Support mix of ftrace and perf
Browse files Browse the repository at this point in the history
It seems there's no reason to prevent mixed used of ftrace and perf
for a single uprobe event.  At least the kprobes already support it.

Link: http://lkml.kernel.org/r/1389946120-19610-6-git-send-email-namhyung@kernel.org

Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Namhyung Kim authored and Steven Rostedt committed Feb 20, 2014
1 parent ca3b162 commit 43fe989
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions kernel/trace/trace_uprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,6 @@ probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file,
int ret;

if (file) {
if (tu->tp.flags & TP_FLAG_PROFILE)
return -EINTR;

link = kmalloc(sizeof(*link), GFP_KERNEL);
if (!link)
return -ENOMEM;
Expand All @@ -893,12 +890,8 @@ probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file,
list_add_tail_rcu(&link->list, &tu->tp.files);

tu->tp.flags |= TP_FLAG_TRACE;
} else {
if (tu->tp.flags & TP_FLAG_TRACE)
return -EINTR;

} else
tu->tp.flags |= TP_FLAG_PROFILE;
}

ret = uprobe_buffer_enable();
if (ret < 0)
Expand Down

0 comments on commit 43fe989

Please sign in to comment.