diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-07-12 16:41:32 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-07-12 16:41:32 +0000 |
commit | 11d8c7be3b9a317ac7c2370f84f5d47476665bcd (patch) | |
tree | bf0cd7387d8ab7826c182bdc00e1c30e002bac04 /sys | |
parent | 5f6d73ffbd36df000697d61d15d7079b608fdf48 (diff) |
remove m_pulldown statistics, which is highly experimental
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_mbuf2.c | 85 | ||||
-rw-r--r-- | sys/netinet/ip6.h | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_var.h | 16 |
3 files changed, 3 insertions, 102 deletions
diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c index 66b9ceaa0a2..3290b524e51 100644 --- a/sys/kern/uipc_mbuf2.c +++ b/sys/kern/uipc_mbuf2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf2.c,v 1.3 2000/06/12 17:24:27 itojun Exp $ */ +/* $OpenBSD: uipc_mbuf2.c,v 1.4 2000/07/12 16:41:30 itojun Exp $ */ /* $KAME: uipc_mbuf2.c,v 1.15 2000/02/22 14:01:37 itojun Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $ */ @@ -66,7 +66,6 @@ * @(#)uipc_mbuf.c 8.4 (Berkeley) 2/14/95 */ -#define PULLDOWN_STAT /*#define PULLDOWN_DEBUG*/ #include <sys/param.h> @@ -74,11 +73,6 @@ #include <sys/proc.h> #include <sys/malloc.h> #include <sys/mbuf.h> -#if defined(PULLDOWN_STAT) && defined(INET6) -#include <netinet/in.h> -#include <netinet/ip6.h> -#include <netinet6/ip6_var.h> -#endif /* * ensure that [off, off + len) is contiguous on the mbuf chain "m". @@ -99,10 +93,6 @@ m_pulldown(m, off, len, offp) struct mbuf *n, *o; int hlen, tlen, olen; int sharedcluster; -#if defined(PULLDOWN_STAT) && defined(INET6) - static struct mbuf *prev = NULL; - int prevlen = 0, prevmlen = 0; -#endif /* check invalid arguments. */ if (m == NULL) @@ -112,72 +102,6 @@ m_pulldown(m, off, len, offp) return NULL; /* impossible */ } -#if defined(PULLDOWN_STAT) && defined(INET6) - ip6stat.ip6s_pulldown++; -#endif - -#if defined(PULLDOWN_STAT) && defined(INET6) - /* statistics for m_pullup */ - ip6stat.ip6s_pullup++; - if (off + len > MHLEN) - ip6stat.ip6s_pullup_fail++; - else { - int dlen, mlen; - - dlen = (prev == m) ? prevlen : m->m_len; - mlen = (prev == m) ? prevmlen : m->m_len + M_TRAILINGSPACE(m); - - if (dlen >= off + len) - ip6stat.ip6s_pullup--; /* call will not be made! */ - else if ((m->m_flags & M_EXT) != 0) { - ip6stat.ip6s_pullup_alloc++; - ip6stat.ip6s_pullup_copy++; - } else { - if (mlen >= off + len) - ip6stat.ip6s_pullup_copy++; - else { - ip6stat.ip6s_pullup_alloc++; - ip6stat.ip6s_pullup_copy++; - } - } - - prevlen = off + len; - prevmlen = MHLEN; - } - - /* statistics for m_pullup2 */ - ip6stat.ip6s_pullup2++; - if (off + len > MCLBYTES) - ip6stat.ip6s_pullup2_fail++; - else { - int dlen, mlen; - - dlen = (prev == m) ? prevlen : m->m_len; - mlen = (prev == m) ? prevmlen : m->m_len + M_TRAILINGSPACE(m); - prevlen = off + len; - prevmlen = mlen; - - if (dlen >= off + len) - ip6stat.ip6s_pullup2--; /* call will not be made! */ - else if ((m->m_flags & M_EXT) != 0) { - ip6stat.ip6s_pullup2_alloc++; - ip6stat.ip6s_pullup2_copy++; - prevmlen = (off + len > MHLEN) ? MCLBYTES : MHLEN; - } else { - if (mlen >= off + len) - ip6stat.ip6s_pullup2_copy++; - else { - ip6stat.ip6s_pullup2_alloc++; - ip6stat.ip6s_pullup2_copy++; - prevmlen = (off + len > MHLEN) ? MCLBYTES - : MHLEN; - } - } - } - - prev = m; -#endif - #ifdef PULLDOWN_DEBUG { struct mbuf *t; @@ -209,10 +133,6 @@ m_pulldown(m, off, len, offp) if ((off == 0 || offp) && len <= n->m_len - off) goto ok; -#if defined(PULLDOWN_STAT) && defined(INET6) - ip6stat.ip6s_pulldown_copy++; -#endif - /* * when len < n->m_len - off and off != 0, it is a special case. * len bytes from <n, off> sits in single mbuf, but the caller does @@ -289,9 +209,6 @@ m_pulldown(m, off, len, offp) * now, we need to do the hard way. don't m_copy as there's no room * on both end. */ -#if defined(PULLDOWN_STAT) && defined(INET6) - ip6stat.ip6s_pulldown_alloc++; -#endif MGET(o, M_DONTWAIT, m->m_type); if (o == NULL) { m_freem(m); diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index 15417526748..72a339a5e01 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6.h,v 1.4 2000/06/13 01:17:13 itojun Exp $ */ +/* $OpenBSD: ip6.h,v 1.5 2000/07/12 16:41:31 itojun Exp $ */ /* $KAME: ip6.h,v 1.7 2000/03/25 07:23:36 sumikawa Exp $ */ /* @@ -262,7 +262,6 @@ do { \ do { \ struct mbuf *t; \ int tmp; \ - ip6stat.ip6s_exthdrget++; \ if ((m)->m_len >= (off) + (len)) \ (val) = (typ)(mtod((m), caddr_t) + (off)); \ else { \ @@ -281,7 +280,6 @@ do { \ #define IP6_EXTHDR_GET0(val, typ, m, off, len) \ do { \ struct mbuf *t; \ - ip6stat.ip6s_exthdrget0++; \ if ((off) == 0) \ (val) = (typ)mtod(m, caddr_t); \ else { \ diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index be445bbc42a..48132c50d9b 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.10 2000/07/06 10:11:25 itojun Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.11 2000/07/12 16:41:31 itojun Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -170,20 +170,6 @@ struct ip6stat { u_quad_t ip6s_exthdrtoolong; /* ext hdr are not continuous */ u_quad_t ip6s_nogif; /* no match gif found */ u_quad_t ip6s_toomanyhdr; /* discarded due to too many headers */ - /* XXX the following two items are not really AF_INET6 thing */ - u_quad_t ip6s_exthdrget; /* # of calls to IP6_EXTHDR_GET */ - u_quad_t ip6s_exthdrget0; /* # of calls to IP6_EXTHDR_GET0 */ - u_quad_t ip6s_pulldown; /* # of calls to m_pulldown */ - u_quad_t ip6s_pulldown_copy; /* # of mbuf copies in m_pulldown */ - u_quad_t ip6s_pulldown_alloc; /* # of mbuf allocs in m_pulldown */ - u_quad_t ip6s_pullup; /* # of calls to m_pullup */ - u_quad_t ip6s_pullup_copy; /* # of possible m_pullup copies */ - u_quad_t ip6s_pullup_alloc; /* # of possible m_pullup mallocs */ - u_quad_t ip6s_pullup_fail; /* # of possible m_pullup failures */ - u_quad_t ip6s_pullup2; /* # of calls to m_pullup2 */ - u_quad_t ip6s_pullup2_copy; /* # of possible m_pullup2 copies */ - u_quad_t ip6s_pullup2_alloc; /* # of possible m_pullup2 mallocs */ - u_quad_t ip6s_pullup2_fail; /* # of possible m_pullup2 failures */ /* * statistics for improvement of the source address selection |