diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-11-21 23:40:34 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-01-14 23:36:38 +0100 |
commit | 55ef9c617b4297d324cabfb68e6cea772349f5b4 (patch) | |
tree | 076859ebf4ed10db9d7cdceed1b764f6a1ad92f7 /slirp | |
parent | 226ea7a96485f2b9db13b523551c536dc68a1689 (diff) | |
download | qemu-55ef9c617b4297d324cabfb68e6cea772349f5b4.zip qemu-55ef9c617b4297d324cabfb68e6cea772349f5b4.tar.gz qemu-55ef9c617b4297d324cabfb68e6cea772349f5b4.tar.bz2 |
slirp: Mark debugging calls as unlikely
to get them out of the hot path.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/debug.h | 8 |
1 files changed, 4 insertions, 4 deletions
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) |