[SSSD] [PATCH 2/4] Move DEBUG macro body to debug_fn

Nikolai Kondrashov Nikolai.Kondrashov at redhat.com
Fri Oct 11 08:34:30 UTC 2013


On 10/10/2013 11:29 PM, Simo Sorce wrote:
> On Thu, 2013-10-10 at 16:25 -0400, Simo Sorce wrote:
>> The code size reduction looks appealing, however please check the
>> level
>> before calling the function, directly in the DEBUG() macro.
>> This way we completely avoid the function call when we are not going
>> to
>> debug anything.
>>
> We could even go as far as wrapping the level test into unlikely() so
> that the compiler can help branch prediction by not calling the function
> by default.

You don't seem to have the "unlikely" macro defined and I would hesitate to
introduce it just for this case, but I would gladly use it if it was there.

Sincerely,
Nick



More information about the sssd-devel mailing list