mirror of
https://github.com/xemu-project/xemu.git
synced 2025-01-31 09:02:37 +00:00
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>
This commit is contained in:
parent
226ea7a964
commit
55ef9c617b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user