Thread (41 messages) 41 messages, 10 authors, 2026-01-05

Re: [PATCH v4 7/7] kernel.h: drop trace_printk.h

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2025-12-28 21:31:51
Also in: dri-devel, intel-gfx, linux-modules, lkml

On Fri, 26 Dec 2025 11:58:48 -0500 Steven Rostedt [off-list ref] wrote:
On Thu, 25 Dec 2025 12:09:29 -0500
"Yury Norov (NVIDIA)" [off-list ref] wrote:
quoted
The trace_printk.h header is debugging-only by nature, but now it's
included by almost every compilation unit via kernel.h.

Removing trace_printk.h saves 1.5-2% of compilation time on my
Ubuntu-derived x86_64/localyesconfig.

There's ~30 files in the codebase, requiring trace_printk.h for
non-debugging reasons: mostly to disable tracing on panic or under
similar conditions. Include the header for those explicitly.

This implicitly decouples linux/kernel.h and linux/instruction_pointer.h
as well, because it has been isolated to trace_printk.h early in the
series.

Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
I'm still against this patch. It means every time someone adds
trace_printk() they need to add the header for it.

trace_printk() should be as available to the kernel as printk() is.
um, why?  trace_printk is used 1% as often as is printk.  Seems
reasonable to include a header file to access such a rarely-used(!) and
specialized thing?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help