VirtualBox

Changeset 21687 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jul 17, 2009 1:49:42 PM (16 years ago)
Author:
vboxsync
Message:

NAT: counters

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/counters.h

    r20713 r21687  
    7474PROFILE_COUNTER(TCP_reassamble, "TCP::reasamble");
    7575PROFILE_COUNTER(TCP_input, "TCP::input");
     76PROFILE_COUNTER(IP_input, "IP::input");
     77PROFILE_COUNTER(IP_output, "IP::output");
     78#ifdef VBOX_WITH_SLIRP_ALIAS
     79PROFILE_COUNTER(ALIAS_input, "ALIAS::input");
     80PROFILE_COUNTER(ALIAS_output, "ALIAS::output");
     81#endif
    7682
  • trunk/src/VBox/Devices/Network/slirp/ip_input.c

    r20165 r21687  
    7777    register struct ip *ip;
    7878    int hlen = 0;
     79    STAM_PROFILE_START(&pData->StatIP_input, a);
     80    STAM_PROFILE_START(&pData->StatALIAS_input, b);
    7981
    8082    DEBUG_CALL("ip_input");
     
    9092        rc = LibAliasIn(m->m_la ? m->m_la : pData->proxy_alias, mtod(m, char *),
    9193            m->m_len);
     94        STAM_PROFILE_STOP(&pData->StatALIAS_input, b);
    9295        Log2(("NAT: LibAlias return %d\n", rc));
    9396    }
     
    97100    {
    98101        ipstat.ips_toosmall++;
     102        STAM_PROFILE_STOP(&pData->StatIP_input, a);
    99103        return;
    100104    }
     
    174178        m = ip_reass(pData, m);
    175179        if (m == NULL)
    176             return;
     180        {
     181             STAM_PROFILE_STOP(&pData->StatIP_input, a);
     182             return;
     183        }
    177184        ip = mtod(m, struct ip *);
    178185        hlen = ip->ip_len;
     
    200207            m_free(pData, m);
    201208    }
     209    STAM_PROFILE_STOP(&pData->StatIP_input, a);
    202210    return;
    203211bad:
     
    205213        &ip->ip_dst, ip->ip_len));
    206214    m_freem(pData, m);
     215    STAM_PROFILE_STOP(&pData->StatIP_input, a);
    207216    return;
    208217}
  • trunk/src/VBox/Devices/Network/slirp/ip_output.c

    r21385 r21687  
    8989    const uint8_t *eth_dst = NULL;
    9090#endif
     91    STAM_PROFILE_START(&pData->StatIP_output, a);
     92    STAM_PROFILE_START(&pData->StatALIAS_output, b);
    9193
    9294    DEBUG_CALL("ip_output");
     
    156158                mtod(m, char *), m->m_len);
    157159            Log2(("NAT: LibAlias return %d\n", rc));
     160            STAM_PROFILE_STOP(&pData->StatALIAS_output, b);
    158161        }
    159162#endif
     
    258261                mtod(m, char *), m->m_len);
    259262            Log2(("NAT: LibAlias return %d\n", rc));
     263            STAM_PROFILE_STOP(&pData->StatALIAS_output, b);
    260264        }
    261265#endif
     
    289293
    290294done:
     295    STAM_PROFILE_STOP(&pData->StatIP_output, a);
    291296    return (error);
    292297
    293298bad:
    294299    m_freem(pData, m0);
     300    STAM_PROFILE_STOP(&pData->StatIP_output, a);
    295301    goto done;
    296302}
  • trunk/src/VBox/Devices/Network/slirp/sbuf.c

    r20712 r21687  
    8383    DEBUG_ARG("m = %lx", (long)m);
    8484    DEBUG_ARG("m->m_len = %d", m->m_len);
    85 
    86     STAM_COUNTER_RESET(&pData->StatIOSBAppend);
    87     STAM_COUNTER_RESET(&pData->StatIOSBAppend_zm);
    88     STAM_COUNTER_RESET(&pData->StatIOSBAppend_wa);
    89     STAM_COUNTER_RESET(&pData->StatIOSBAppend_wf);
    90     STAM_COUNTER_RESET(&pData->StatIOSBAppend_wp);
    9185
    9286    STAM_COUNTER_INC(&pData->StatIOSBAppend);
     
    162156    len = m->m_len;
    163157
    164     STAM_COUNTER_RESET(&pData->StatIOSBAppendSB);
    165     STAM_COUNTER_RESET(&pData->StatIOSBAppendSB_w_l_r);
    166     STAM_COUNTER_RESET(&pData->StatIOSBAppendSB_w_ge_r);
    167     STAM_COUNTER_RESET(&pData->StatIOSBAppendSB_w_alter);
    168 
    169158    STAM_COUNTER_INC(&pData->StatIOSBAppendSB);
    170159    if (sb->sb_wptr < sb->sb_rptr)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette