summaryrefslogtreecommitdiff
path: root/Documentation/trace/kprobetrace.rst
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>2024-03-04 12:41:15 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2024-03-07 00:27:53 +0900
commite8c32f24766a1f22da024e73d1eb8e9c822482ac (patch)
treeb0d6af06bc60908c19e59510c9f1c351aad7e85a /Documentation/trace/kprobetrace.rst
parentf6e2253a617c4030b807a18383101b59d6f0f536 (diff)
downloadlinux-e8c32f24766a1f22da024e73d1eb8e9c822482ac.tar.gz
linux-e8c32f24766a1f22da024e73d1eb8e9c822482ac.tar.bz2
linux-e8c32f24766a1f22da024e73d1eb8e9c822482ac.zip
Documentation: tracing: Add entry argument access at function exit
Add a notes about the entry argument access at function exit probes for kprobes and fprobe trace event. Link: https://lore.kernel.org/all/170952367549.229804.8843506960483577062.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'Documentation/trace/kprobetrace.rst')
-rw-r--r--Documentation/trace/kprobetrace.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index bf9cecb69fc9..a49662ccd53c 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -70,6 +70,15 @@ Synopsis of kprobe_events
(\*3) this is useful for fetching a field of data structures.
(\*4) "u" means user-space dereference. See :ref:`user_mem_access`.
+Function arguments at kretprobe
+-------------------------------
+Function arguments can be accessed at kretprobe using $arg<N> fetcharg. This
+is useful to record the function parameter and return value at once, and
+trace the difference of structure fields (for debuging a function whether it
+correctly updates the given data structure or not).
+See the :ref:`sample<fprobetrace_exit_args_sample>` in fprobe event for how
+it works.
+
.. _kprobetrace_types:
Types