Re: [PATCH v4 1/3] ftrace: Build trace_btf.c when CONFIG_DEBUG_INFO_BTF is enabled
From: Donglin Peng
Date: Mon Jun 29 2026 - 09:39:50 EST
On Wed, May 13, 2026 at 10:42 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
>
> Sorry for the late reply, I've been a bit busy on other things recently.
>
> On Mon, 15 Dec 2025 11:41:51 +0800
> Donglin Peng <dolinux.peng@xxxxxxxxx> wrote:
>
> > From: pengdonglin <pengdonglin@xxxxxxxxxx>
> >
> > The trace_btf.c file provides BTF helper functions used by the ftrace
> > subsystem. This change makes its compilation solely dependent on
>
> Nit, change logs should never say "This change". Instead it should be
> worded as:
>
> "Make the compilation of trace_btf.c soley depend on..."
Thanks, I will fix it.
>
> -- Steve
>
> > CONFIG_DEBUG_INFO_BTF, allowing features like funcgraph-retval to also
> > utilize these helpers.
> >
> > Additionally, the redundant dependency on CONFIG_PROBE_EVENTS_BTF_ARGS
> > is removed, as CONFIG_DEBUG_INFO_BTF already depends on
> > CONFIG_BPF_SYSCALL.
> >
> > Cc: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> > Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
> > Cc: Xiaoqin Zhang <zhangxiaoqin@xxxxxxxxxx>
> > Signed-off-by: pengdonglin <pengdonglin@xxxxxxxxxx>
> > ---
> > kernel/trace/Kconfig | 2 +-
> > kernel/trace/Makefile | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
> > index e1214b9dc990..653c1fcefa4c 100644
> > --- a/kernel/trace/Kconfig
> > +++ b/kernel/trace/Kconfig
> > @@ -755,7 +755,7 @@ config FPROBE_EVENTS
> > config PROBE_EVENTS_BTF_ARGS
> > depends on HAVE_FUNCTION_ARG_ACCESS_API
> > depends on FPROBE_EVENTS || KPROBE_EVENTS
> > - depends on DEBUG_INFO_BTF && BPF_SYSCALL
> > + depends on DEBUG_INFO_BTF
> > bool "Support BTF function arguments for probe events"
> > default y
> > help
> > diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
> > index fc5dcc888e13..6c4bf5a6c4f3 100644
> > --- a/kernel/trace/Makefile
> > +++ b/kernel/trace/Makefile
> > @@ -116,7 +116,7 @@ obj-$(CONFIG_KGDB_KDB) += trace_kdb.o
> > endif
> > obj-$(CONFIG_DYNAMIC_EVENTS) += trace_dynevent.o
> > obj-$(CONFIG_PROBE_EVENTS) += trace_probe.o
> > -obj-$(CONFIG_PROBE_EVENTS_BTF_ARGS) += trace_btf.o
> > +obj-$(CONFIG_DEBUG_INFO_BTF) += trace_btf.o
> > obj-$(CONFIG_UPROBE_EVENTS) += trace_uprobe.o
> > obj-$(CONFIG_BOOTTIME_TRACING) += trace_boot.o
> > obj-$(CONFIG_FTRACE_RECORD_RECURSION) += trace_recursion_record.o
>