On 20.03.2024 12:58, George Dunlap wrote:
> On Mon, Mar 18, 2024 at 4:36 PM Andrew Cooper <andrew.coop...@citrix.com> 
> wrote:
>>
>> trace() and trace_time(), in function form for struct arguments, and macro
>> form for simple uint32_t list arguments.
>>
>> This will be used to clean up the mess of macros which exists throughout the
>> codebase, as well as eventually dropping __trace_var().
>>
>> There is intentionally no macro to split a 64-bit parameter in the new API,
>> for MISRA reasons.
>>
>> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> 
> Thanks for doing this, it all looks good to me.
> 
> I'll note that last time this was posted, there were some questions.
> One was regarding underscores in the macro parameters.  I don't care
> about this enough to stop it going in.

We ought to finally settle on our take on this, preferably recording
the outcome in ./CODING_STYLE.

> The other question was about the use of ##__VA_ARGS__. I don't
> actually understand what that comment was trying to say, as a quick
> Google search it appears that 1) this will do what I think it should
> do, and 2) it works both in gcc and clang.
> 
> We should give Jan a chance to explain his second point more clearly
> before checking it in;

Well. Gcc 13.2 documentation explicitly mentions this form; interestingly
with a quick search I couldn't find the original extension's documentation
anymore. It is possible that I didn't spot this 2.5 years ago. It is also
possible the their doc has changed in the meantime. In any event, my view
back at the time was that I'd preferably see us use the (long-standing)
gcc extension (args...) or use __VA_ARGS__ in a standard compliant way.
Yet with the original form no longer properly documented, maybe they have
a plan to remove that at some point. So while my preference stays for the
time being, I also don't mind if this code is left as is.

Jan

> but:
> 
> Reviewed-by: George Dunlap <george.dun...@cloud.com>


Reply via email to