[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260105115027.1aea85c1@gandalf.local.home>
Date: Mon, 5 Jan 2026 11:50:27 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Yury Norov <yury.norov@...il.com>
Cc: Jani Nikula <jani.nikula@...ux.intel.com>, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com>, Joel Fernandes
<joelagnelf@...dia.com>, Andrew Morton <akpm@...ux-foundation.org>, Masami
Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Christophe Leroy <chleroy@...nel.org>,
Randy Dunlap <rdunlap@...radead.org>, Ingo Molnar <mingo@...nel.org>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>, David Laight
<david.laight@...box.com>, Petr Pavlu <petr.pavlu@...e.com>, Andi Shyti
<andi.shyti@...nel.org>, Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko
Ursulin <tursulin@...ulin.net>, Daniel Gomez <da.gomez@...nel.org>, Greg
Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki"
<rafael@...nel.org>, Danilo Krummrich <dakr@...nel.org>,
linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-modules@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v4 7/7] kernel.h: drop trace_printk.h
On Mon, 5 Jan 2026 11:36:11 -0500
Yury Norov <yury.norov@...il.com> wrote:
> > You do realize this means recompiling everything when adding D=1 for
> > debugging?
>
> Yes sir I do.
>
> It would be as simple (or hard) as building another arch:
>
> make O=../build/linux-arm64
> make O=../build/linux-x86_64
> make D=1 W=1 O=../build/linux-x86_64-dev
>
> If you're both developer and CI engineer in your company, you're likely
> already doing something like that. If you're CI-only, there're no
> changes for you. If you're a developer - yeah, you'd have to learn a
> new flag.
I'm saying this right now.
Hard-nacked-by: Steven Rostedt <rostedt@...dmis.org>
Why do you want to burden developers?
>
> The real problem of course is the status inflation. The fact that
> defconfig enables CONFIG_EXPERT and CONFIG_DEBUG_KERNEL implies that
> every random person who is able to do:
>
> git clone && make && sudo make install
>
> now assumed an expert kernel user and active developer. It is not
> correct, and it leads to bloating kernel with dev-only features.
>
> What we discuss here is a new marker for those real experts and
> developers, I think. (In an hope that it will inflate not very fast.)
This is a generic feature that helps all developers. The ones spending the
most time in maintaining the kernel.
Add the config I mentioned:
config HIDE_TRACE_PRINTK
depends on TRACING
help
trace_printk() is an extremely powerful utility to debug and develop
kernel code. It is defined in kernel.h so that it can be easily accessed
during development or having to debug existing code.
But trace_printk() is not to be included in the final result, and having
it in kernel.h during normal builds where the builder has no plans of
debugging the kernel causes wasted cycles and time in compiling the kernel.
By saying yes here, the include of trace_printk() macros will be hidden
from kernel.h and help speed up the compile.
If you do not plan on debugging this kernel, say Y
It is default 'n' as the normal person building their own kernel likely
wants to debug it. Once you set this to 'y' then you get your "fast" builds.
Then in kernel.h have:
#ifndef CONFIG_HIDE_TRACE_PRINTK
# include <linux/trace_printk.h>
#endif
-- Steve
Powered by blists - more mailing lists