2014-02-21 02:52:09

by Steven Rostedt

[permalink] [raw]
Subject: [for-next][PATCH 16/18] tracing/uprobes: Support mix of ftrace and perf

From: Namhyung Kim <[email protected]>

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/[email protected]

Reviewed-by: Masami Hiramatsu <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Srikar Dronamraju <[email protected]>
Cc: zhangwei(Jovi) <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
---
kernel/trace/trace_uprobe.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 01fcb0d..e447336 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -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;
@@ -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)
--
1.8.5.3