purge COUNT crap now that we have gprof
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 21 Jun 1982 03:22:00 +0000 (19:22 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 21 Jun 1982 03:22:00 +0000 (19:22 -0800)
SCCS-vsn: sys/kern/uipc_syscalls.c 4.20
SCCS-vsn: sys/kern/uipc_mbuf.c 1.36
SCCS-vsn: sys/kern/uipc_pipe.c 4.13
SCCS-vsn: sys/kern/uipc_proto.c 4.22
SCCS-vsn: sys/kern/uipc_socket.c 4.42

usr/src/sys/kern/uipc_mbuf.c
usr/src/sys/kern/uipc_pipe.c
usr/src/sys/kern/uipc_proto.c
usr/src/sys/kern/uipc_socket.c
usr/src/sys/kern/uipc_syscalls.c

index cd93676..9bfa33a 100644 (file)
@@ -1,4 +1,4 @@
-/*     uipc_mbuf.c     1.35    82/06/14        */
+/*     uipc_mbuf.c     1.36    82/06/20        */
 
 #include "../h/param.h"
 #include "../h/dir.h"
 
 #include "../h/param.h"
 #include "../h/dir.h"
@@ -14,7 +14,6 @@
 mbinit()
 {
 
 mbinit()
 {
 
-COUNT(MBINIT);
        if (m_clalloc(4, MPG_MBUFS) == 0)
                goto bad;
        if (m_clalloc(32, MPG_CLUSTERS) == 0)
        if (m_clalloc(4, MPG_MBUFS) == 0)
                goto bad;
        if (m_clalloc(32, MPG_CLUSTERS) == 0)
@@ -34,7 +33,6 @@ m_clalloc(ncl, how)
        register int i;
        int s;
 
        register int i;
        int s;
 
-COUNT(M_CLALLOC);
        npg = ncl * CLSIZE;
        s = splimp();           /* careful: rmalloc isn't reentrant */
        mbx = rmalloc(mbmap, npg);
        npg = ncl * CLSIZE;
        s = splimp();           /* careful: rmalloc isn't reentrant */
        mbx = rmalloc(mbmap, npg);
@@ -78,7 +76,6 @@ m_pgfree(addr, n)
        int n;
 {
 
        int n;
 {
 
-COUNT(M_PGFREE);
 #ifdef lint
        addr = addr; n = n;
 #endif
 #ifdef lint
        addr = addr; n = n;
 #endif
@@ -87,7 +84,6 @@ COUNT(M_PGFREE);
 m_expand()
 {
 
 m_expand()
 {
 
-COUNT(M_EXPAND);
        if (m_clalloc(1, MPG_MBUFS) == 0)
                goto steal;
        return (1);
        if (m_clalloc(1, MPG_MBUFS) == 0)
                goto steal;
        return (1);
@@ -109,7 +105,6 @@ m_get(canwait)
 {
        register struct mbuf *m;
 
 {
        register struct mbuf *m;
 
-COUNT(M_GET);
        MGET(m, canwait);
        return (m);
 }
        MGET(m, canwait);
        return (m);
 }
@@ -120,7 +115,6 @@ m_getclr(canwait)
 {
        register struct mbuf *m;
 
 {
        register struct mbuf *m;
 
-COUNT(M_GETCLR);
        m = m_get(canwait);
        if (m == 0)
                return (0);
        m = m_get(canwait);
        if (m == 0)
                return (0);
@@ -135,7 +129,6 @@ m_free(m)
 {
        register struct mbuf *n;
 
 {
        register struct mbuf *n;
 
-COUNT(M_FREE);
        MFREE(m, n);
        return (n);
 }
        MFREE(m, n);
        return (n);
 }
@@ -147,7 +140,6 @@ m_more(type)
 {
        register struct mbuf *m;
 
 {
        register struct mbuf *m;
 
-COUNT(M_MORE);
        if (!m_expand()) {
                mbstat.m_drops++;
                return (NULL);
        if (!m_expand()) {
                mbstat.m_drops++;
                return (NULL);
@@ -164,7 +156,6 @@ m_freem(m)
        register struct mbuf *n;
        register int s;
 
        register struct mbuf *n;
        register int s;
 
-COUNT(M_FREEM);
        if (m == NULL)
                return;
        s = splimp();
        if (m == NULL)
                return;
        s = splimp();
@@ -185,7 +176,6 @@ m_copy(m, off, len)
 {
        register struct mbuf *n, **np;
        struct mbuf *top, *p;
 {
        register struct mbuf *n, **np;
        struct mbuf *top, *p;
-COUNT(M_COPY);
 
        if (len == 0)
                return (0);
 
        if (len == 0)
                return (0);
@@ -259,7 +249,6 @@ m_adj(mp, len)
 {
        register struct mbuf *m, *n;
 
 {
        register struct mbuf *m, *n;
 
-COUNT(M_ADJ);
        if ((m = mp) == NULL)
                return;
        if (len >= 0) {
        if ((m = mp) == NULL)
                return;
        if (len >= 0) {
index 68c5cd2..3892e14 100644 (file)
@@ -1,4 +1,4 @@
-/*     uipc_pipe.c     4.12    82/06/14        */
+/*     uipc_pipe.c     4.13    82/06/20        */
 
 #include "../h/param.h"
 #include "../h/dir.h"
 
 #include "../h/param.h"
 #include "../h/dir.h"
@@ -30,7 +30,6 @@ piconnect(wso, rso)
        struct socket *wso, *rso;
 {
 
        struct socket *wso, *rso;
 {
 
-COUNT(PICONNECT);
        /* when we reserve memory this routine may fail */
        wso->so_proto = rso->so_proto = &pipeproto;
        wso->so_pcb = (caddr_t)rso;
        /* when we reserve memory this routine may fail */
        wso->so_proto = rso->so_proto = &pipeproto;
        wso->so_pcb = (caddr_t)rso;
@@ -57,7 +56,6 @@ piusrreq(so, req, m, addr)
 {
        struct socket *so2 = (struct socket *)so->so_pcb;
 
 {
        struct socket *so2 = (struct socket *)so->so_pcb;
 
-COUNT(PIUSRREQ);
        switch (req) {
 
        case PRU_ATTACH:
        switch (req) {
 
        case PRU_ATTACH:
index e99cd32..c147272 100644 (file)
@@ -1,4 +1,4 @@
-/*     uipc_proto.c    4.21    82/04/25        */
+/*     uipc_proto.c    4.22    82/06/20        */
 
 #include "../h/param.h"
 #include "../h/socket.h"
 
 #include "../h/param.h"
 #include "../h/socket.h"
@@ -139,7 +139,6 @@ pfinit()
 {
        register struct protosw *pr;
 
 {
        register struct protosw *pr;
 
-COUNT(PFINIT);
        for (pr = protoswLAST; pr >= protosw; pr--)
                if (pr->pr_init)
                        (*pr->pr_init)();
        for (pr = protoswLAST; pr >= protosw; pr--)
                if (pr->pr_init)
                        (*pr->pr_init)();
@@ -155,7 +154,6 @@ pffindtype(family, type)
 {
        register struct protosw *pr;
 
 {
        register struct protosw *pr;
 
-COUNT(PFFINDTYPE);
        if (family == 0)
                return (0);
        for (pr = protosw; pr <= protoswLAST; pr++)
        if (family == 0)
                return (0);
        for (pr = protosw; pr <= protoswLAST; pr++)
@@ -173,7 +171,6 @@ pffindproto(family, protocol)
 {
        register struct protosw *pr;
 
 {
        register struct protosw *pr;
 
-COUNT(PFFINDPROTO);
        if (family == 0)
                return (0);
        for (pr = protosw; pr <= protoswLAST; pr++)
        if (family == 0)
                return (0);
        for (pr = protosw; pr <= protoswLAST; pr++)
@@ -187,7 +184,6 @@ pfctlinput(cmd, arg)
        caddr_t arg;
 {
        register struct protosw *pr;
        caddr_t arg;
 {
        register struct protosw *pr;
-COUNT(PFCTLINPUT);
 
        for (pr = protosw; pr <= protoswLAST; pr++)
                if (pr->pr_ctlinput)
 
        for (pr = protosw; pr <= protoswLAST; pr++)
                if (pr->pr_ctlinput)
@@ -201,7 +197,6 @@ pfslowtimo()
 {
        register struct protosw *pr;
 
 {
        register struct protosw *pr;
 
-COUNT(PFSLOWTIMO);
        for (pr = protoswLAST; pr >= protosw; pr--)
                if (pr->pr_slowtimo)
                        (*pr->pr_slowtimo)();
        for (pr = protoswLAST; pr >= protosw; pr--)
                if (pr->pr_slowtimo)
                        (*pr->pr_slowtimo)();
@@ -211,7 +206,6 @@ pffasttimo()
 {
        register struct protosw *pr;
 
 {
        register struct protosw *pr;
 
-COUNT(PFSLOWTIMO);
        for (pr = protoswLAST; pr >= protosw; pr--)
                if (pr->pr_fasttimo)
                        (*pr->pr_fasttimo)();
        for (pr = protoswLAST; pr >= protosw; pr--)
                if (pr->pr_fasttimo)
                        (*pr->pr_fasttimo)();
index b8f1fb8..150ba40 100644 (file)
@@ -1,4 +1,4 @@
-/*     uipc_socket.c   4.41    82/06/14        */
+/*     uipc_socket.c   4.42    82/06/20        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -38,7 +38,6 @@ socreate(aso, type, asp, asa, options)
        register struct socket *so;
        struct mbuf *m;
        int pf, proto, error;
        register struct socket *so;
        struct mbuf *m;
        int pf, proto, error;
-COUNT(SOCREATE);
 
        /*
         * Use process standard protocol/protocol family if none
 
        /*
         * Use process standard protocol/protocol family if none
@@ -96,7 +95,6 @@ sofree(so)
        struct socket *so;
 {
 
        struct socket *so;
 {
 
-COUNT(SOFREE);
        if (so->so_pcb || (so->so_state & SS_USERGONE) == 0)
                return;
        sbrelease(&so->so_snd);
        if (so->so_pcb || (so->so_state & SS_USERGONE) == 0)
                return;
        sbrelease(&so->so_snd);
@@ -117,7 +115,6 @@ soclose(so, exiting)
 {
        int s = splnet();               /* conservative */
 
 {
        int s = splnet();               /* conservative */
 
-COUNT(SOCLOSE);
        if (so->so_pcb == 0)
                goto discard;
        if (exiting)
        if (so->so_pcb == 0)
                goto discard;
        if (exiting)
@@ -165,7 +162,6 @@ sostat(so, sb)
        struct stat *sb;
 {
 
        struct stat *sb;
 {
 
-COUNT(SOSTAT);
        bzero((caddr_t)sb, sizeof (*sb));               /* XXX */
        return (0);                                     /* XXX */
 }
        bzero((caddr_t)sb, sizeof (*sb));               /* XXX */
        return (0);                                     /* XXX */
 }
@@ -180,7 +176,6 @@ soaccept(so, asa)
        int s = splnet();
        int error;
 
        int s = splnet();
        int error;
 
-COUNT(SOACCEPT);
        if ((so->so_options & SO_ACCEPTCONN) == 0) {
                error = EINVAL;                 /* XXX */
                goto bad;
        if ((so->so_options & SO_ACCEPTCONN) == 0) {
                error = EINVAL;                 /* XXX */
                goto bad;
@@ -208,7 +203,6 @@ soconnect(so, asa)
        int s = splnet();
        int error;
 
        int s = splnet();
        int error;
 
-COUNT(SOCONNECT);
        if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) {
                error = EISCONN;
                goto bad;
        if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) {
                error = EISCONN;
                goto bad;
@@ -232,7 +226,6 @@ sodisconnect(so, asa)
        int s = splnet();
        int error;
 
        int s = splnet();
        int error;
 
-COUNT(SODISCONNECT);
        if ((so->so_state & SS_ISCONNECTED) == 0) {
                error = ENOTCONN;
                goto bad;
        if ((so->so_state & SS_ISCONNECTED) == 0) {
                error = ENOTCONN;
                goto bad;
@@ -264,7 +257,6 @@ sosend(so, asa)
        register u_int len;
        int error = 0, space, s;
 
        register u_int len;
        int error = 0, space, s;
 
-COUNT(SOSEND);
        if (sosendallatonce(so) && u.u_count > so->so_snd.sb_hiwat)
                return (EMSGSIZE);
 #ifdef notdef
        if (sosendallatonce(so) && u.u_count > so->so_snd.sb_hiwat)
                return (EMSGSIZE);
 #ifdef notdef
@@ -359,7 +351,6 @@ soreceive(so, asa)
        int eor, s, error = 0, cnt = u.u_count;
        caddr_t base = u.u_base;
 
        int eor, s, error = 0, cnt = u.u_count;
        caddr_t base = u.u_base;
 
-COUNT(SORECEIVE);
 restart:
        sblock(&so->so_rcv);
        s = splnet();
 restart:
        sblock(&so->so_rcv);
        s = splnet();
@@ -468,7 +459,6 @@ soioctl(so, cmd, cmdp)
        register caddr_t cmdp;
 {
 
        register caddr_t cmdp;
 {
 
-COUNT(SOIOCTL);
        switch (cmd) {
 
        case FIONBIO: {
        switch (cmd) {
 
        case FIONBIO: {
index fbead41..7c0de78 100644 (file)
@@ -1,4 +1,4 @@
-/*     uipc_syscalls.c 4.19    82/06/14        */
+/*     uipc_syscalls.c 4.20    82/06/20        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -34,7 +34,6 @@ spipe()
        register struct file *rf, *wf;
        struct socket *rso, *wso;
        int r;
        register struct file *rf, *wf;
        struct socket *rso, *wso;
        int r;
-COUNT(SPIPE);
        
        u.u_error = socreate(&rso, SOCK_STREAM,
            &localproto, (struct sockaddr *)0, 0);
        
        u.u_error = socreate(&rso, SOCK_STREAM,
            &localproto, (struct sockaddr *)0, 0);
@@ -91,7 +90,6 @@ ssocket()
        struct sockaddr sa;
        struct socket *so;
        register struct file *fp;
        struct sockaddr sa;
        struct socket *so;
        register struct file *fp;
-COUNT(SSOCKET);
 
        if ((fp = falloc()) == NULL)
                return;
 
        if ((fp = falloc()) == NULL)
                return;
@@ -125,7 +123,6 @@ saccept()
        register struct file *fp;
        struct socket *so;
        int s;
        register struct file *fp;
        struct socket *so;
        int s;
-COUNT(SACCEPT);
 
        if (uap->asa && useracc((caddr_t)uap->asa, sizeof (sa), B_WRITE)==0) {
                u.u_error = EFAULT;
 
        if (uap->asa && useracc((caddr_t)uap->asa, sizeof (sa), B_WRITE)==0) {
                u.u_error = EFAULT;
@@ -184,7 +181,6 @@ sconnect()
        register struct file *fp;
        register struct socket *so;
        int s;
        register struct file *fp;
        register struct socket *so;
        int s;
-COUNT(SCONNECT);
 
        if (copyin((caddr_t)uap->a, (caddr_t)&sa, sizeof (sa))) {
                u.u_error = EFAULT;
 
        if (copyin((caddr_t)uap->a, (caddr_t)&sa, sizeof (sa))) {
                u.u_error = EFAULT;
@@ -228,7 +224,6 @@ ssend()
        } *uap = (struct a *)u.u_ap;
        register struct file *fp;
        struct sockaddr sa;
        } *uap = (struct a *)u.u_ap;
        register struct file *fp;
        struct sockaddr sa;
-COUNT(SSEND);
 
        fp = getf(uap->fdes);
        if (fp == 0)
 
        fp = getf(uap->fdes);
        if (fp == 0)
@@ -262,7 +257,6 @@ sreceive()
        } *uap = (struct a *)u.u_ap;
        register struct file *fp;
        struct sockaddr sa;
        } *uap = (struct a *)u.u_ap;
        register struct file *fp;
        struct sockaddr sa;
-COUNT(SRECEIVE);
 
        fp = getf(uap->fdes);
        if (fp == 0)
 
        fp = getf(uap->fdes);
        if (fp == 0)
@@ -299,7 +293,6 @@ ssocketaddr()
        register struct file *fp;
        register struct socket *so;
        struct sockaddr addr;
        register struct file *fp;
        register struct socket *so;
        struct sockaddr addr;
-COUNT(SSOCKETADDR);
 
        fp = getf(uap->fdes);
        if (fp == 0)
 
        fp = getf(uap->fdes);
        if (fp == 0)