diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-01-17 03:08:39 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-02-20 12:30:10 -0500 |
commit | ca3b162021a421b38a9cd7b66555b9b01568dc9d (patch) | |
tree | 58c8fa7e2826a75d8c578751b31c4fd08d8e8cd4 /kernel/trace | |
parent | 70ed91c6ec7f8bf20369634017d887d48ac979d2 (diff) |
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.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>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_uprobe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 349c6df9e332..01fcb0db75cb 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c | |||
@@ -776,6 +776,9 @@ static void __uprobe_trace_func(struct trace_uprobe *tu, | |||
776 | if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE)) | 776 | if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE)) |
777 | return; | 777 | return; |
778 | 778 | ||
779 | if (ftrace_trigger_soft_disabled(ftrace_file)) | ||
780 | return; | ||
781 | |||
779 | esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu)); | 782 | esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu)); |
780 | size = esize + tu->tp.size + dsize; | 783 | size = esize + tu->tp.size + dsize; |
781 | event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, | 784 | event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, |
@@ -795,8 +798,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu, | |||
795 | 798 | ||
796 | memcpy(data, ucb->buf, tu->tp.size + dsize); | 799 | memcpy(data, ucb->buf, tu->tp.size + dsize); |
797 | 800 | ||
798 | if (!call_filter_check_discard(call, entry, buffer, event)) | 801 | event_trigger_unlock_commit(ftrace_file, buffer, event, entry, 0, 0); |
799 | trace_buffer_unlock_commit(buffer, event, 0, 0); | ||
800 | } | 802 | } |
801 | 803 | ||
802 | /* uprobe handler */ | 804 | /* uprobe handler */ |