From 55ef9c617b4297d324cabfb68e6cea772349f5b4 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 21 Nov 2018 23:40:34 +0100 Subject: slirp: Mark debugging calls as unlikely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to get them out of the hot path. Signed-off-by: Samuel Thibault Reviewed-by: Marc-André Lureau --- slirp/debug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'slirp') diff --git a/slirp/debug.h b/slirp/debug.h index 25a5d59..269d97d 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) -- cgit v1.1