[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <170891994330.609861.9109792572425248438.stgit@devnote2>
Date: Mon, 26 Feb 2024 12:59:03 +0900
From: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>,
Jiri Olsa <jolsa@...nel.org>
Cc: linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org,
mhiramat@...nel.org,
linux-doc@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: [PATCH v2 7/7] Documentation: tracing: Add entry argument access at function exit
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Add a notes about the entry argument access at function exit probes for
kprobes and fprobe trace event.
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
---
Documentation/trace/fprobetrace.rst | 7 +++++++
Documentation/trace/kprobetrace.rst | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/Documentation/trace/fprobetrace.rst b/Documentation/trace/fprobetrace.rst
index e35e6b18df40..ab71ebf178cb 100644
--- a/Documentation/trace/fprobetrace.rst
+++ b/Documentation/trace/fprobetrace.rst
@@ -70,6 +70,13 @@ Synopsis of fprobe-events
For the details of TYPE, see :ref:`kprobetrace documentation <kprobetrace_types>`.
+Function arguments at exit
+--------------------------
+Function arguments can be accessed at exit probe 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)
+
BTF arguments
-------------
BTF (BPF Type Format) argument allows user to trace function and tracepoint
diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index bf9cecb69fc9..35a383f95746 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -70,6 +70,13 @@ 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)
+
.. _kprobetrace_types:
Types
Powered by blists - more mailing lists