Skip to content

Commit ca3b162

Browse files
namhyungrostedt
authored andcommitted
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/[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]> Cc: Tom Zanussi <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent 70ed91c commit ca3b162

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernel/trace/trace_uprobe.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,9 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
776776
if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE))
777777
return;
778778

779+
if (ftrace_trigger_soft_disabled(ftrace_file))
780+
return;
781+
779782
esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
780783
size = esize + tu->tp.size + dsize;
781784
event = trace_event_buffer_lock_reserve(&buffer, ftrace_file,
@@ -795,8 +798,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
795798

796799
memcpy(data, ucb->buf, tu->tp.size + dsize);
797800

798-
if (!call_filter_check_discard(call, entry, buffer, event))
799-
trace_buffer_unlock_commit(buffer, event, 0, 0);
801+
event_trigger_unlock_commit(ftrace_file, buffer, event, entry, 0, 0);
800802
}
801803

802804
/* uprobe handler */

0 commit comments

Comments
 (0)