mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
Documentation: tracing: Add a note about argument and retval access
Add a note about the argument and return value accecss will be best effort. Depending on the type, it will be passed via stack or a pair of the registers, but $argN and $retval only support the single register access. Link: https://lore.kernel.org/all/169556269377.146934.14829235476649685954.stgit@devnote2/ Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
This commit is contained in:
parent
89cdf9d556
commit
b2a866975f
2 changed files with 12 additions and 4 deletions
|
@ -59,8 +59,12 @@ Synopsis of fprobe-events
|
||||||
and bitfield are supported.
|
and bitfield are supported.
|
||||||
|
|
||||||
(\*1) This is available only when BTF is enabled.
|
(\*1) This is available only when BTF is enabled.
|
||||||
(\*2) only for the probe on function entry (offs == 0).
|
(\*2) only for the probe on function entry (offs == 0). Note, this argument access
|
||||||
(\*3) only for return probe.
|
is best effort, because depending on the argument type, it may be passed on
|
||||||
|
the stack. But this only support the arguments via registers.
|
||||||
|
(\*3) only for return probe. Note that this is also best effort. Depending on the
|
||||||
|
return value type, it might be passed via a pair of registers. But this only
|
||||||
|
accesses one register.
|
||||||
(\*4) this is useful for fetching a field of data structures.
|
(\*4) this is useful for fetching a field of data structures.
|
||||||
(\*5) "u" means user-space dereference.
|
(\*5) "u" means user-space dereference.
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,12 @@ Synopsis of kprobe_events
|
||||||
(x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr"
|
(x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr"
|
||||||
and bitfield are supported.
|
and bitfield are supported.
|
||||||
|
|
||||||
(\*1) only for the probe on function entry (offs == 0).
|
(\*1) only for the probe on function entry (offs == 0). Note, this argument access
|
||||||
(\*2) only for return probe.
|
is best effort, because depending on the argument type, it may be passed on
|
||||||
|
the stack. But this only support the arguments via registers.
|
||||||
|
(\*2) only for return probe. Note that this is also best effort. Depending on the
|
||||||
|
return value type, it might be passed via a pair of registers. But this only
|
||||||
|
accesses one register.
|
||||||
(\*3) this is useful for fetching a field of data structures.
|
(\*3) this is useful for fetching a field of data structures.
|
||||||
(\*4) "u" means user-space dereference. See :ref:`user_mem_access`.
|
(\*4) "u" means user-space dereference. See :ref:`user_mem_access`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue