Re: [PATCH 1/2] tracepoints: Add helper to test if tracepoint is enabled in a header

From: Mathieu Desnoyers
Date: Fri Sep 25 2020 - 13:05:47 EST


----- On Sep 25, 2020, at 12:26 PM, rostedt rostedt@xxxxxxxxxxx wrote:

> On Fri, 25 Sep 2020 11:30:06 -0400 (EDT)
> Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
>
>> > Anyway, I don't see any issues with the current patch set as is
>> > (besides the documentation fix, which I already updated locally). And
>> > will add this to my queue for linux-next.
>>
>> The only thing I would change in the documentation is to word this as
>> "here is a trampoline trick which can be used to work-around rare cases
>> of tracepoint header circular dependency issues" rather than "always use
>> this when instrumenting a header".
>>
>
> I rather not have tracepoints in headers. Period!
>
> It's not just about circular dependencies, it also bloats the code.

Fair enough. We could indeed argue that having a tracepoint in a header's
static inline function will end up replicating that tracepoint at every
site where the function is used. So in terms of code size, it's better
to use the trampoline approach.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com