Re: [RFC PATCH v7 03/10] trace: add stackmap statistics interface
From: Steven Rostedt
Date: Tue Nov 03 2026 - 19:36:23 EST
On Sat, 12 Sep 2026 16:37:46 +0800
Li Pengfei <ljdlns1987@xxxxxxxxx> wrote:
> @@ -9411,6 +9411,18 @@ static __init void tracer_init_tracefs_work_func(struct work_struct *work)
> */
> smp_store_release(&global_trace.stackmap, smap);
> WRITE_ONCE(stackmap_init_state, STACKMAP_INIT_DONE);
> + /*
> + * stat is an auxiliary observability
> + * surface. If it fails to be created we keep
> + * dedup enabled -- the kernel side still
> + * works and stack_map alone is enough to
> + * resolve and reset; trace_create_file()
> + * already pr_warn()s on failure.
> + */
The above comment is useless. Get rid of it.
-- Steve
> + trace_create_file("stack_map_stat",
> + TRACE_MODE_READ, NULL,
> + smap,
> + &ftrace_stackmap_stat_fops);
> }
> } else {
> pr_warn("ftrace stackmap init failed, dedup disabled\n");