]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/probe: Add immediate string parameter support
authorMasami Hiramatsu <mhiramat@kernel.org>
Wed, 19 Jun 2019 15:08:37 +0000 (00:08 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 31 Aug 2019 16:19:39 +0000 (12:19 -0400)
commit31f63c92655ae71371c9b60b1f17ce6ffb096859
tree75303cede44b02307d5d504bf4a0d1ce84dcee24
parent41dcbdef60b326239750e2f7a60277ad2b9692d6
tracing/probe: Add immediate string parameter support

Add immediate string parameter (\"string") support to
probe events. This allows you to specify an immediate
(or dummy) parameter instead of fetching a string from
memory.

This feature looks odd, but imagine that you put a probe
on a code to trace some string data. If the code is
compiled into 2 instructions and 1 instruction has a
string on memory but other has no string since it is
optimized out. In that case, you can not fold those into
one event, even if ftrace supported multiple probes on
one event. With this feature, you can set a dummy string
like foo=\"(optimized)":string instead of something
like foo=+0(+0(%bp)):string.

Link: http://lkml.kernel.org/r/156095691687.28024.13372712423865047991.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c
kernel/trace/trace_kprobe.c
kernel/trace/trace_probe.c
kernel/trace/trace_probe.h
kernel/trace/trace_uprobe.c