Re: [RFC IDEA] ftrace: stack trace deduplication in ring buffer

Steven Rostedt <[email protected]> Wed, 13 May 2026 08:51:45 -0400
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <20260513085145.30dd23e0@fedora>
On Wed, 13 May 2026 11:55:24 +0800
=E6=9D=8E=E9=B9=8F=E9=A3=9E <[email protected]> wrote:

> My question: is this something you'd consider for upstream ftrace,
> or do you feel this belongs in the eBPF/perf domain? If you're open
> to it, I'll prepare a proper RFC patch series addressing:

Yes, this looks appropriate for the tracefs infrastructure.

> - Pre-allocated bucket pool (no GFP_ATOMIC in trace path)

Have you looked at the tracing_map.c code that handles the histograms
for trace events?

> - Per-trace_array instance support
> - rhashtable or similar proven data structure
> - trace-cmd/libtraceevent plugin for stack_id resolution

If it is a standard format that is not expected to change, then it
could simply go into the libtraceevent core.

Thanks,

-- Steve