qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 64/64] slirp: Mark debugging calls as unlikely


From: Samuel Thibault
Subject: [Qemu-devel] [PULL 64/64] slirp: Mark debugging calls as unlikely
Date: Wed, 19 Dec 2018 00:04:42 +0100

to get them out of the hot path.

Signed-off-by: Samuel Thibault <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
---
 slirp/debug.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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)
-- 
2.19.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]