Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Remove unused debug code.



details:   https://anonhg.NetBSD.org/src/rev/3f86e10d534f
branches:  trunk
changeset: 318516:3f86e10d534f
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Apr 27 19:06:48 2018 +0000
description:
Remove unused debug code.

diffstat:

 sys/kern/uipc_mbuf.c |   5 ++---
 sys/sys/mbuf.h       |  30 +-----------------------------
 2 files changed, 3 insertions(+), 32 deletions(-)

diffs (83 lines):

diff -r 90b016f354ec -r 3f86e10d534f sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Fri Apr 27 18:40:40 2018 +0000
+++ b/sys/kern/uipc_mbuf.c      Fri Apr 27 19:06:48 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.209 2018/04/27 18:40:40 maxv Exp $     */
+/*     $NetBSD: uipc_mbuf.c,v 1.210 2018/04/27 19:06:48 maxv Exp $     */
 
 /*
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.209 2018/04/27 18:40:40 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.210 2018/04/27 19:06:48 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
@@ -147,7 +147,6 @@
        atomic_inc_uint(&(o)->m_ext.ext_refcnt);                        \
        (n)->m_ext_ref = (o)->m_ext_ref;                                \
        mowner_ref((n), (n)->m_flags);                                  \
-       MCLREFDEBUGN((n), __FILE__, __LINE__);                          \
 } while (/* CONSTCOND */ 0)
 
 static int
diff -r 90b016f354ec -r 3f86e10d534f sys/sys/mbuf.h
--- a/sys/sys/mbuf.h    Fri Apr 27 18:40:40 2018 +0000
+++ b/sys/sys/mbuf.h    Fri Apr 27 19:06:48 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.h,v 1.197 2018/04/27 16:32:03 maxv Exp $  */
+/*     $NetBSD: mbuf.h,v 1.198 2018/04/27 19:06:48 maxv Exp $  */
 
 /*
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -275,13 +275,6 @@
        } ext_un;
 #define        ext_paddr       ext_un.extun_paddr
 #define        ext_pgs         ext_un.extun_pgs
-
-#ifdef DEBUG
-       const char *ext_ofile;
-       const char *ext_nfile;
-       int ext_oline;
-       int ext_nline;
-#endif
 };
 
 struct _m_ext {
@@ -464,33 +457,12 @@
 
 #if defined(_KERNEL)
 #define        _M_
-/*
- * Macros for tracking external storage associated with an mbuf.
- */
-#ifdef DEBUG
-#define MCLREFDEBUGN(m, file, line)                                    \
-do {                                                                   \
-       (m)->m_ext.ext_nfile = (file);                                  \
-       (m)->m_ext.ext_nline = (line);                                  \
-} while (/* CONSTCOND */ 0)
-
-#define MCLREFDEBUGO(m, file, line)                                    \
-do {                                                                   \
-       (m)->m_ext.ext_ofile = (file);                                  \
-       (m)->m_ext.ext_oline = (line);                                  \
-} while (/* CONSTCOND */ 0)
-#else
-#define MCLREFDEBUGN(m, file, line)
-#define MCLREFDEBUGO(m, file, line)
-#endif
 
 #define        MCLINITREFERENCE(m)                                             \
 do {                                                                   \
        KASSERT(((m)->m_flags & M_EXT) == 0);                           \
        (m)->m_ext_ref = (m);                                           \
        (m)->m_ext.ext_refcnt = 1;                                      \
-       MCLREFDEBUGO((m), __FILE__, __LINE__);                          \
-       MCLREFDEBUGN((m), NULL, 0);                                     \
 } while (/* CONSTCOND */ 0)
 
 /*



Home | Main Index | Thread Index | Old Index