mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
Make Slirp statistics gathering and output conditional to LOG_ENABLED
Add 'info slirp' command to monitor to display statistics Disable Slirp debugging code by default git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3451 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
7d294b61ed
commit
31a60e2275
22 changed files with 203 additions and 125 deletions
|
@ -263,7 +263,7 @@ again:
|
|||
/*
|
||||
* No reason to send a segment, just return.
|
||||
*/
|
||||
tcpstat.tcps_didnuttin++;
|
||||
STAT(tcpstat.tcps_didnuttin++);
|
||||
|
||||
return (0);
|
||||
|
||||
|
@ -339,13 +339,13 @@ send:
|
|||
*/
|
||||
if (len) {
|
||||
if (tp->t_force && len == 1)
|
||||
tcpstat.tcps_sndprobe++;
|
||||
STAT(tcpstat.tcps_sndprobe++);
|
||||
else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) {
|
||||
tcpstat.tcps_sndrexmitpack++;
|
||||
tcpstat.tcps_sndrexmitbyte += len;
|
||||
STAT(tcpstat.tcps_sndrexmitpack++);
|
||||
STAT(tcpstat.tcps_sndrexmitbyte += len);
|
||||
} else {
|
||||
tcpstat.tcps_sndpack++;
|
||||
tcpstat.tcps_sndbyte += len;
|
||||
STAT(tcpstat.tcps_sndpack++);
|
||||
STAT(tcpstat.tcps_sndbyte += len);
|
||||
}
|
||||
|
||||
m = m_get();
|
||||
|
@ -382,13 +382,13 @@ send:
|
|||
flags |= TH_PUSH;
|
||||
} else {
|
||||
if (tp->t_flags & TF_ACKNOW)
|
||||
tcpstat.tcps_sndacks++;
|
||||
STAT(tcpstat.tcps_sndacks++);
|
||||
else if (flags & (TH_SYN|TH_FIN|TH_RST))
|
||||
tcpstat.tcps_sndctrl++;
|
||||
STAT(tcpstat.tcps_sndctrl++);
|
||||
else if (SEQ_GT(tp->snd_up, tp->snd_una))
|
||||
tcpstat.tcps_sndurg++;
|
||||
STAT(tcpstat.tcps_sndurg++);
|
||||
else
|
||||
tcpstat.tcps_sndwinup++;
|
||||
STAT(tcpstat.tcps_sndwinup++);
|
||||
|
||||
m = m_get();
|
||||
if (m == NULL) {
|
||||
|
@ -500,7 +500,7 @@ send:
|
|||
if (tp->t_rtt == 0) {
|
||||
tp->t_rtt = 1;
|
||||
tp->t_rtseq = startseq;
|
||||
tcpstat.tcps_segstimed++;
|
||||
STAT(tcpstat.tcps_segstimed++);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,7 +567,7 @@ out:
|
|||
*/
|
||||
return (error);
|
||||
}
|
||||
tcpstat.tcps_sndtotal++;
|
||||
STAT(tcpstat.tcps_sndtotal++);
|
||||
|
||||
/*
|
||||
* Data sent (as far as we can tell).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue