[PATCH] Wrap the DEBUG checks in a "unlikely"
Stefan (metze) Metzmacher
metze at samba.org
Fri Dec 28 06:51:08 GMT 2007
> #define DEBUGADDC( dbgc_class, level, body ) \
> (void)( ((level) <= MAX_DEBUG_LEVEL) && \
> - ((DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))|| \
> + unlikely((DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))|| \
> (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] && \
> DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \
> && (dbgtext body) )
wouldn't it make sense to put the whole logic into the unlikely?
(void)(unlikely( ((level) <= MAX_DEBUG_LEVEL) && \
((DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))|| \
(!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] && \
DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) )) \
&& (dbgtest body) )
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20071228/cccbe7da/signature.bin
More information about the samba-technical
mailing list