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

Simo Sorce simo at redhat.com
Fri Oct 11 12:23:47 UTC 2013


On Fri, 2013-10-11 at 11:34 +0300, Nikolai Kondrashov wrote:
> 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.

Ok, not a big deal.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the sssd-devel mailing list