diff mbox series

[PULL,64/65] slirp: Mark debugging calls as unlikely

Message ID 20190114225306.21569-65-samuel.thibault@ens-lyon.org (mailing list archive)
State New, archived
Headers show
Series [PULL,01/65] slirp: associate slirp_output callback with the Slirp context | expand

Commit Message

Samuel Thibault Jan. 14, 2019, 10:53 p.m. UTC
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>
---
 slirp/debug.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/slirp/debug.h b/slirp/debug.h
index 25a5d59439..269d97d807 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)