aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorAndersBroman <a.broman@bredband.net>2014-05-08 21:32:36 +0200
committerAnders Broman <a.broman58@gmail.com>2014-05-08 19:58:52 +0000
commitaa3a968eb6e85c47014a4cec4a2b955357b0e77f (patch)
tree3930086adcc70c0dc6882b18eacfd589ad06596a /dumpcap.c
parent379c9f25dfb71217a7cfec02e7e949b60d556b7f (diff)
Profiling show that g_log() takes a lot of CPU even when logging isn't
active. Change-Id: I242f8e98a77861c0174e432c7026964babae7299 Reviewed-on: https://code.wireshark.org/review/1565 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 56a28fea7b..2ceed867a8 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -4048,9 +4048,11 @@ capture_loop_write_packet_cb(u_char *pcap_opts_p, const struct pcap_pkthdr *phdr
global_ld.err = err;
pcap_opts->dropped++;
} else {
+#if defined(DEBUG_DUMPCAP) || defined(DEBUG_CHILD_DUMPCAP)
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO,
"Wrote a packet of length %d captured on interface %u.",
phdr->caplen, pcap_opts->interface_id);
+#endif
global_ld.packet_count++;
pcap_opts->received++;
/* if the user told us to stop after x packets, do we already have enough? */