[Slirp] [Git][slirp/libslirp][master] 2 commits: Move DEBUG_CALL("if_start") to DEBUG_VERBOSE_CALL
Samuel Thibault
gitlab at gitlab.freedesktop.org
Wed Mar 17 21:05:24 UTC 2021
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
0c07defb by Doug Evans at 2021-03-17T09:30:33-07:00
Move DEBUG_CALL("if_start") to DEBUG_VERBOSE_CALL
This debugging printf reduces the overall S/N ratio of debug output
in the normal case, so separate it out.
Signed-off-by: Doug Evans <dje at google.com>
- - - - -
487f4bf4 by Samuel Thibault at 2021-03-17T21:05:21+00:00
Merge branch 'verbose-if-start' into 'master'
Move DEBUG_CALL("if_start") to DEBUG_VERBOSE_CALL
See merge request slirp/libslirp!78
- - - - -
3 changed files:
- src/debug.h
- src/if.c
- src/slirp.c
Changes:
=====================================
src/debug.h
=====================================
@@ -10,6 +10,7 @@
#define DBG_MISC (1 << 1)
#define DBG_ERROR (1 << 2)
#define DBG_TFTP (1 << 3)
+#define DBG_VERBOSE_CALL (1 << 4)
extern int slirp_debug;
@@ -20,6 +21,13 @@ extern int slirp_debug;
} \
} while (0)
+#define DEBUG_VERBOSE_CALL(fmt, ...) \
+ do { \
+ if (G_UNLIKELY(slirp_debug & DBG_VERBOSE_CALL)) { \
+ g_debug(fmt "...", ##__VA_ARGS__); \
+ } \
+ } while (0)
+
#define DEBUG_ARG(fmt, ...) \
do { \
if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
=====================================
src/if.c
=====================================
@@ -143,7 +143,7 @@ void if_start(Slirp *slirp)
bool from_batchq = false;
struct mbuf *ifm, *ifm_next, *ifqt;
- DEBUG_CALL("if_start");
+ DEBUG_VERBOSE_CALL("if_start");
if (slirp->if_start_busy) {
return;
=====================================
src/slirp.c
=====================================
@@ -362,6 +362,7 @@ static void slirp_init_once(void)
{ "misc", DBG_MISC },
{ "error", DBG_ERROR },
{ "tftp", DBG_TFTP },
+ { "verbose_call", DBG_VERBOSE_CALL },
};
slirp_debug = g_parse_debug_string(debug, keys, G_N_ELEMENTS(keys));
}
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/43930496beb307813f77ec97577f028db8891b1c...487f4bf4dab31a80c42111ad8f922e061a35f6ea
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/43930496beb307813f77ec97577f028db8891b1c...487f4bf4dab31a80c42111ad8f922e061a35f6ea
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20210317/7bbdd530/attachment-0001.htm>
More information about the Slirp
mailing list