Skip to content

Commit b2a8669

Browse files
committed
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 <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent 89cdf9d commit b2a8669

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Documentation/trace/fprobetrace.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ Synopsis of fprobe-events
5959
and bitfield are supported.
6060

6161
(\*1) This is available only when BTF is enabled.
62-
(\*2) only for the probe on function entry (offs == 0).
63-
(\*3) only for return probe.
62+
(\*2) only for the probe on function entry (offs == 0). Note, this argument access
63+
is best effort, because depending on the argument type, it may be passed on
64+
the stack. But this only support the arguments via registers.
65+
(\*3) only for return probe. Note that this is also best effort. Depending on the
66+
return value type, it might be passed via a pair of registers. But this only
67+
accesses one register.
6468
(\*4) this is useful for fetching a field of data structures.
6569
(\*5) "u" means user-space dereference.
6670

Documentation/trace/kprobetrace.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ Synopsis of kprobe_events
6161
(x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr"
6262
and bitfield are supported.
6363

64-
(\*1) only for the probe on function entry (offs == 0).
65-
(\*2) only for return probe.
64+
(\*1) only for the probe on function entry (offs == 0). Note, this argument access
65+
is best effort, because depending on the argument type, it may be passed on
66+
the stack. But this only support the arguments via registers.
67+
(\*2) only for return probe. Note that this is also best effort. Depending on the
68+
return value type, it might be passed via a pair of registers. But this only
69+
accesses one register.
6670
(\*3) this is useful for fetching a field of data structures.
6771
(\*4) "u" means user-space dereference. See :ref:`user_mem_access`.
6872

0 commit comments

Comments
 (0)