Re: [PATCH v2 1/2] tracing: Move non-trace_printk prototypes into trace_controls.h

From: Steven Rostedt

Date: Tue Jun 23 2026 - 04:25:24 EST


On Mon, 22 Jun 2026 09:41:16 -0400
Yury Norov <yury.norov@xxxxxxxxx> wrote:

> > +void trace_dump_stack(int skip);
>
> The function description says:
>
> record a stack back trace in the trace buffer
>
> So, to me it sounds like it should go to the trace_printk.h.

The main reason I don't want these in trace_printk.h is because they
are not the same as trace_printk(). These are usually called when
things go wrong, and are usually called along with tracing_off(), to
stop the trace to make sure you don't lose the trace of the bug that
triggered the dump.

These can also be in production with no problem, as they are triggered
when things go wrong. trace_printk() should *not* be used in production.

The uses of these are fundamentally different than the use of
trace_printk(). They are not just for development environments.

I'll update the change log to note this.

-- Steve