mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
tracing/uprobes: Support mix of ftrace and perf
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>
This commit is contained in:
parent
ca3b162021
commit
43fe98913c
@ -882,9 +882,6 @@ probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
if (tu->tp.flags & TP_FLAG_PROFILE)
|
|
||||||
return -EINTR;
|
|
||||||
|
|
||||||
link = kmalloc(sizeof(*link), GFP_KERNEL);
|
link = kmalloc(sizeof(*link), GFP_KERNEL);
|
||||||
if (!link)
|
if (!link)
|
||||||
return -ENOMEM;
|
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);
|
list_add_tail_rcu(&link->list, &tu->tp.files);
|
||||||
|
|
||||||
tu->tp.flags |= TP_FLAG_TRACE;
|
tu->tp.flags |= TP_FLAG_TRACE;
|
||||||
} else {
|
} else
|
||||||
if (tu->tp.flags & TP_FLAG_TRACE)
|
|
||||||
return -EINTR;
|
|
||||||
|
|
||||||
tu->tp.flags |= TP_FLAG_PROFILE;
|
tu->tp.flags |= TP_FLAG_PROFILE;
|
||||||
}
|
|
||||||
|
|
||||||
ret = uprobe_buffer_enable();
|
ret = uprobe_buffer_enable();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user