[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ef45e0180fdf6c8ff9456a6ac3f4e184dcfd0c22.1578688120.git.zanussi@kernel.org>
Date: Fri, 10 Jan 2020 14:35:15 -0600
From: Tom Zanussi <zanussi@...nel.org>
To: rostedt@...dmis.org
Cc: artem.bityutskiy@...ux.intel.com, mhiramat@...nel.org,
linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org
Subject: [PATCH v2 09/12] tracing: Add trace_kprobe_run_command()
From: Masami Hiramatsu <mhiramat@...nel.org>
This snippet was taken from v4 of Masami's 'tracing/boot: Add kprobe
event support' patch.
trace_kprobe_run_command() provides the means to execute the kprobe
event create command using the kprobe event command string, from
kernel code.
Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
---
kernel/trace/trace_kprobe.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 7f890262c8a3..25dac3745afb 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -902,6 +902,11 @@ static int create_or_delete_trace_kprobe(int argc, char **argv)
return ret == -ECANCELED ? -EINVAL : ret;
}
+int trace_kprobe_run_command(const char *command)
+{
+ return trace_run_command(command, create_or_delete_trace_kprobe);
+}
+
static int trace_kprobe_release(struct dyn_event *ev)
{
struct trace_kprobe *tk = to_trace_kprobe(ev);
--
2.14.1
Powered by blists - more mailing lists