Commit ca3b1620 authored by Namhyung Kim's avatar Namhyung Kim Committed by Steven Rostedt

tracing/uprobes: Support event triggering

Add support for event triggering to uprobes.  This is same as kprobes
support added by Tom (plus cleanup by Steven).

Link: http://lkml.kernel.org/r/1389946120-19610-5-git-send-email-namhyung@kernel.orgReviewed-by: default avatarMasami 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>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 70ed91c6
...@@ -776,6 +776,9 @@ static void __uprobe_trace_func(struct trace_uprobe *tu, ...@@ -776,6 +776,9 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE)) if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE))
return; return;
if (ftrace_trigger_soft_disabled(ftrace_file))
return;
esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu)); esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
size = esize + tu->tp.size + dsize; size = esize + tu->tp.size + dsize;
event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, event = trace_event_buffer_lock_reserve(&buffer, ftrace_file,
...@@ -795,8 +798,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu, ...@@ -795,8 +798,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
memcpy(data, ucb->buf, tu->tp.size + dsize); memcpy(data, ucb->buf, tu->tp.size + dsize);
if (!call_filter_check_discard(call, entry, buffer, event)) event_trigger_unlock_commit(ftrace_file, buffer, event, entry, 0, 0);
trace_buffer_unlock_commit(buffer, event, 0, 0);
} }
/* uprobe handler */ /* uprobe handler */
......
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