Re: [PATCH v5] arch/x86: port I/O tracing on x86

From: Dan Raymond
Date: Mon Oct 23 2023 - 17:30:01 EST


On 10/21/2023 2:15 PM, Steven Rostedt wrote:

>> Why are these needed to be changed at all? What code changes with it,
>> and it's not mentioned in the changelog, so why is it required?
>
> Agreed, if this has issues, it probably should be a separate patch.

As I mentioned to Greg, this fix is needed to avoid compiler warnings
triggered by this patch. If I submitted this separately it would have
to be merged first. Isn't it easier to combine them since this is
not a functional change (it just makes a cast explicit)?

>>> -#ifdef CONFIG_TRACEPOINTS
>>> +#if defined(CONFIG_TRACEPOINTS) && !defined(DISABLE_TRACEPOINTS)
>>
>> Why this global change?
>
> Yeah, DISABLE_TRACEPOINTS does not currently exist. If this is to be a
> new way to disable TRACEPOINTS it needs a separate patch and be able to
> disable tracepoints everywhere (maybe include/trace/*.h files also need
> to be modified?), and also be documented somewhere in Documentation/trace.

It's only needed to suppress compiler errors when building arch/x86/boot/*
and arch/x86/realmode/*. Those source files include various x86 headers
such as <asm/msr.h> and <asm/shared/io.h>. Those x86 headers include
<linux/tracepoint-defs.h> which references static_key_false() in
<linux/jump_label.h>. DISABLE_TRACEPOINTS eliminates that reference and
hence suppresses the compiler error.

I didn't intend for this macro to be used by developers adding new
tracepoints so I didn't document it as such. As far as creating a
separate patch: again this is a requirement for this patch and it doesn't
cause any functional changes so can't we combine them?