[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
- [Qemu-devel] [PULL 49/64] slirp: use virtual time for packet expiration, (continued)
- [Qemu-devel] [PULL 49/64] slirp: use virtual time for packet expiration, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 59/64] slirp: factor out guestfwd addition checks, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 47/64] slirp: drop <Vista compatibility, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 53/64] slirp: no need to make DPRINTF conditional on DEBUG, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 58/64] slirp: replace DEBUG_ARGS with DEBUG_ARG, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 52/64] slirp: replace a DEBUG block with WITH_ICMP_ERROR_MSG, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 62/64] slirp: set G_LOG_DOMAIN, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 56/64] slirp: use %p for pointers format, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 57/64] slirp: remove remaining DEBUG blocks, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 61/64] build-sys: use a seperate slirp-obj-y && slirp.mo, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 64/64] slirp: Mark debugging calls as unlikely,
Samuel Thibault <=
- [Qemu-devel] [PULL 55/64] slirp: introduce SLIRP_DEBUG environment variable, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 63/64] slirp: call into g_debug() for DEBUG macros, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 60/64] slirp: add clock_get_ns() callback, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 50/64] slirp: replace a fprintf with g_critical(), Samuel Thibault, 2018/12/18
- Re: [Qemu-devel] [PULL 00/64] slirp updates, Peter Maydell, 2018/12/19
- Re: [Qemu-devel] [PULL 00/64] slirp updates, no-reply, 2018/12/24
- Re: [Qemu-devel] [PULL 00/64] slirp updates, no-reply, 2018/12/24