Index: generic/nsfInt.h =================================================================== diff -u -rc6057c18970d5bc19fe0f1f760ef0d29898ecfdd -rf6a37db73b3ab59faf0bd0486c19548655f98bfe --- generic/nsfInt.h (.../nsfInt.h) (revision c6057c18970d5bc19fe0f1f760ef0d29898ecfdd) +++ generic/nsfInt.h (.../nsfInt.h) (revision f6a37db73b3ab59faf0bd0486c19548655f98bfe) @@ -31,14 +31,19 @@ # include #endif -#if defined(NSF_DTRACE) -# include "nsfDTrace.h" -# if defined(__GNUC__) && __GNUC__ > 2 -/* Use gcc branch prediction hint to minimize cost of DTrace ENABLED checks. */ +#if defined(__GNUC__) && __GNUC__ > 2 +/* Use gcc branch prediction hint to minimize cost of e.g. DTrace + * ENABLED checks. + */ # define unlikely(x) (__builtin_expect((x), 0)) -# else +# define likely(x) (__builtin_expect((x), 1)) +#else # define unlikely(x) (x) -# endif +# define likely(x) (x) +#endif + +#if defined(NSF_DTRACE) +# include "nsfDTrace.h" # define NSF_DTRACE_METHOD_ENTRY_ENABLED() unlikely(NSF_METHOD_ENTRY_ENABLED()) # define NSF_DTRACE_METHOD_RETURN_ENABLED() unlikely(NSF_METHOD_RETURN_ENABLED()) # define NSF_DTRACE_OBJECT_ALLOC_ENABLED() unlikely(NSF_OBJECT_ALLOC_ENABLED())