Re: [PATCH 5/7] tracing: add config option for print arguments in ftrace

From
Zheng Yejian <hidden>
Date
2024-09-06 03:36:16
Also in
lkml
Reply to
Sven Schnelle, 2024-09-04
On 2024/9/4 14:58, Sven Schnelle wrote:
quoted hunk ↗ jump to hunk
Add a config option to disable/enable function argument
printing support during runtime.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
---
  kernel/trace/Kconfig | 12 ++++++++++++
  1 file changed, 12 insertions(+)
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 721c3b221048..8b9b6cdf39ac 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -242,6 +242,18 @@ config FUNCTION_GRAPH_RETVAL
  	  enable it via the trace option funcgraph-retval.
  	  See Documentation/trace/ftrace.rst
  
+config FUNCTION_TRACE_ARGS
+	bool "Kernel Function Tracer Arguments"
+	depends on HAVE_FUNCTION_ARG_ACCESS_API
+	depends on DEBUG_INFO_BTF && BPF_SYSCALL
Nice feature!

Just a nit, DEBUG_INFO_BTF currently depends on BPF_SYSCALL,
so BPF_SYSCALL may not be necessary here. This feature
also doesn't seem to depend on bpf.
quoted hunk ↗ jump to hunk
+	default n
+	help
+	  Support recording and printing of function arguments when using
+	  the function tracer or function graph tracer. This feature is off
+	  by default, and can be enabled via the trace option func-args (for
+	  the function tracer) and funcgraph-args (for the function graph
+	  tracer).
+
  config DYNAMIC_FTRACE
  	bool "enable/disable function tracing dynamically"
  	depends on FUNCTION_TRACER
-- 
Thanks,
Zheng Yejian
Thread (19 messages) 19 messages, 6 authors, last reply 2024-10-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help