From: Samuel Thibault Date: Wed, 21 Nov 2018 22:40:34 +0000 (+0100) Subject: slirp: Mark debugging calls as unlikely X-Git-Tag: v4.0.0-rc0~163^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55ef9c617b4297d324cabfb68e6cea772349f5b4;p=thirdparty%2Fqemu.git slirp: Mark debugging calls as unlikely to get them out of the hot path. Signed-off-by: Samuel Thibault Reviewed-by: Marc-André Lureau --- diff --git a/slirp/debug.h b/slirp/debug.h index 25a5d59439a..269d97d8073 100644 --- a/slirp/debug.h +++ b/slirp/debug.h @@ -15,25 +15,25 @@ extern int slirp_debug; #define DEBUG_CALL(fmt, ...) do { \ - if (slirp_debug & DBG_CALL) { \ + if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \ g_debug(fmt "...", ##__VA_ARGS__); \ } \ } while (0) #define DEBUG_ARG(fmt, ...) do { \ - if (slirp_debug & DBG_CALL) { \ + if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \ g_debug(" " fmt, ##__VA_ARGS__); \ } \ } while (0) #define DEBUG_MISC(fmt, ...) do { \ - if (slirp_debug & DBG_MISC) { \ + if (G_UNLIKELY(slirp_debug & DBG_MISC)) { \ g_debug(fmt, ##__VA_ARGS__); \ } \ } while (0) #define DEBUG_ERROR(fmt, ...) do { \ - if (slirp_debug & DBG_ERROR) { \ + if (G_UNLIKELY(slirp_debug & DBG_ERROR)) { \ g_debug(fmt, ##__VA_ARGS__); \ } \ } while (0)