Re: [PATCH perf-tools-next v9 2/6] perf ftrace: Support filtering return address comments
From: Aaron Tomlin
Date: Fri Oct 23 2026 - 10:12:56 EST
On Thu, Oct 22, 2026 at 12:51:34PM -0700, Namhyung Kim wrote:
> Hello,
>
> On Tue, Oct 20, 2026 at 10:33:33PM -0400, Aaron Tomlin wrote:
> > When tracing with the Linux kernel's function graph tracer, enabling
> > funcgraph-retaddr records the return address of each function entry as
> > a comment in the trace stream (e.g. /* <-load_elf_phdrs+0x6c/0xb0 */).
> > While valuable for tracing execution origins, these trailing comments
> > can add considerable visual clutter to the call graph, particularly
> > when examining deeply nested call trees or when synthesising higher-level
> > abstractions.
> >
> > Introduce support for filtering out return address comments from
> > function graph trace output. Provide a standalone --filter-retaddr
> > flag.
>
> I think we agreed not to have this option in the previous discussion,
> no? The retaddr will appear only if user passed an option, so you can
> unconditionally filter out the comment if it's not given, right?
>
> Thanks,
> Namhyung
Hi Namhyung,
Yes, we did. Since --graph-opts retaddr already defines whether the user
wants to see return address comments, there is no need for a standalone
--filter-retaddr option.
Whenever perf ftrace enables funcgraph-retaddr internally (for --inline or
-G/--graph-funcs), we can simply strip the /* <-caller */ comments
unconditionally if !ftrace->graph_retaddr. If the user explicitly passed
--graph-opts retaddr, we leave them in place.
I will drop the --filter-retaddr option and its documentation, and wire the
filtering directly to !ftrace->graph_retaddr.
Kind regards,
--
Aaron Tomlin