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

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

From: Joel Fernandes <joelagnelf@nvidia.com>
Date: 2026-01-05 19:33:41
Also in: dri-devel, intel-gfx, linux-modules, lkml


On 1/5/2026 1:21 PM, Christophe Leroy (CS GROUP) wrote:

Le 05/01/2026 à 18:11, Joel Fernandes a écrit :
quoted

On 1/5/2026 11:39 AM, Steven Rostedt wrote:
quoted
On Sun, 4 Jan 2026 02:20:55 +0200
Andy Shevchenko [off-list ref] wrote:
quoted
quoted
I do not think it is necessary to move it.
I'm not talking about move, I'm talking about the C 101 thingy. Any custom API
should be included before use, otherwise compiler won't see it. Which header do
you want to include to have this API being provided? Note, it's really bad
situation right now with the header to be included implicitly via non-obvious
or obscure path. The discussion moved as far as I see it towards the finding a
good place for the trace_printk.h.
It's not a normal API. It's for debugging the kernel. Thus it should be
available everywhere without having to add a header. Hence, the best place
to include trace_printk.h, is in kernel.h.

I'm thinking that my proposed config option is the best solution now. For
those that do not care about debugging the kernel, you enable the
"HIDE_TRACE_PRINTK" config so that your builds will be "quicker". But for
everyone else, it will not slow down their workflow when they need to debug
code.
100% agree. We do have people running custom configs for faster builds, so this
hide thing could be enabled there assuming those don't care about debug.

In other words, "If it aint broke, don't fix it".
But if I understand correctly, it would save 2% build time. That means 12
secondes on a 10 minutes build. Is it really worth it ?
99% of my kernel builds are usually 90 seconds. I throw a lot of cores at it and
with ccache. I care more about trace_printk not being available than saving 2%.
But YMMV. I am sure there are people who care a lot about build time, but for me
it has not (yet) been a problem.

 - Joel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help