Re: [GIT PULL] tracing: Updates for 7.2
From: Vincent Mailhol
Date: Thu Jun 25 2026 - 16:56:03 EST
On 24/06/2026 at 11:21, Steven Rostedt wrote:
> On Mon, 22 Jun 2026 04:55:47 -0400
> Steven Rostedt <steven@xxxxxxxxxxx> wrote:
>
>> It really isn't about me. I personally don't care if I have to add a
>> patch to include it in kernel.h in my environment. It's just something
>> that all the other kernel developers will need to now remember to add
>> (and then remove) the include.
>
> For me, I just updated my ktest config and added:
>
> CFLAGS_KERNEL='-include $(srctree)/include/linux/trace_printk.h' CFLAGS_MODULE='-include $(srctree)/include/linux/trace_printk.h'
>
> to the kernel build and it works like it used to. But that doesn't help
> others. I may update the trace_printk documentation to mention the
> above to keep the old behavior.
Maybe what could make sense is to add a CONFIG_CUSTOM_CFLAGS entry to
Kconfig. This can be versatile enough to cover many uses cases:
- Add your custom linux/trace_printk.h include as you described above.
- Add optimizations (other than -march=native which already has its
own Kbuild entry). Can be useful for optimized cross builds.
- Add your non common compiler checks (for example -fanalyzer).
- (list not exhaustive)
That would be one entry to handle all the weird/unique use cases. I
personally do not rely often enough on trace_printk.h to wish for a
dedicated Kconfig entry just for that, but a CONFIG_CUSTOM_CFLAGS would
cover some of my use cases while also solving your problem.
Yes, all of these can be passed on the command line, but that would be a
quality of live improvement to have the config remember these for us.
Yours sincerely,
Vincent Mailhol