From 354b00bc1ec9f99e2ea629090a372b4d0cc04b2f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 4 Feb 1999 15:00:14 +0000 Subject: Added printf()'s that can be uncommented to trace MBUF operations. This is very useful when debugging a device driver. --- c/src/exec/libnetworking/sys/mbuf.h | 3 +++ c/src/lib/libnetworking/sys/mbuf.h | 3 +++ c/src/libnetworking/sys/mbuf.h | 3 +++ 3 files changed, 9 insertions(+) (limited to 'c/src') diff --git a/c/src/exec/libnetworking/sys/mbuf.h b/c/src/exec/libnetworking/sys/mbuf.h index 0c2299c5a6..6afe2541d5 100644 --- a/c/src/exec/libnetworking/sys/mbuf.h +++ b/c/src/exec/libnetworking/sys/mbuf.h @@ -192,6 +192,7 @@ union mcluster { (void)m_mballoc(1, (_how)); \ if (((_m) = mmbfree) != 0) { \ mmbfree = (_m)->m_next; \ +/* printf( "MGET: %p\n", (_m) ); */ \ mbstat.m_mtypes[MT_FREE]--; \ (_m)->m_type = (_type); \ mbstat.m_mtypes[_type]++; \ @@ -212,6 +213,7 @@ union mcluster { (void)m_mballoc(1, (_how)); \ if (((_m) = mmbfree) != 0) { \ mmbfree = (_m)->m_next; \ +/* printf( "MGETHDR: %p\n", (_m) ); */ \ mbstat.m_mtypes[MT_FREE]--; \ (_m)->m_type = (_type); \ mbstat.m_mtypes[_type]++; \ @@ -272,6 +274,7 @@ union mcluster { */ #define MFREE(_m, _n) \ MBUFLOCK( \ +/* printf( "MFREE: %p\n", (_m) ); */ \ mbstat.m_mtypes[(_m)->m_type]--; \ if ((_m)->m_flags & M_EXT) { \ if ((_m)->m_ext.ext_free) \ diff --git a/c/src/lib/libnetworking/sys/mbuf.h b/c/src/lib/libnetworking/sys/mbuf.h index 0c2299c5a6..6afe2541d5 100644 --- a/c/src/lib/libnetworking/sys/mbuf.h +++ b/c/src/lib/libnetworking/sys/mbuf.h @@ -192,6 +192,7 @@ union mcluster { (void)m_mballoc(1, (_how)); \ if (((_m) = mmbfree) != 0) { \ mmbfree = (_m)->m_next; \ +/* printf( "MGET: %p\n", (_m) ); */ \ mbstat.m_mtypes[MT_FREE]--; \ (_m)->m_type = (_type); \ mbstat.m_mtypes[_type]++; \ @@ -212,6 +213,7 @@ union mcluster { (void)m_mballoc(1, (_how)); \ if (((_m) = mmbfree) != 0) { \ mmbfree = (_m)->m_next; \ +/* printf( "MGETHDR: %p\n", (_m) ); */ \ mbstat.m_mtypes[MT_FREE]--; \ (_m)->m_type = (_type); \ mbstat.m_mtypes[_type]++; \ @@ -272,6 +274,7 @@ union mcluster { */ #define MFREE(_m, _n) \ MBUFLOCK( \ +/* printf( "MFREE: %p\n", (_m) ); */ \ mbstat.m_mtypes[(_m)->m_type]--; \ if ((_m)->m_flags & M_EXT) { \ if ((_m)->m_ext.ext_free) \ diff --git a/c/src/libnetworking/sys/mbuf.h b/c/src/libnetworking/sys/mbuf.h index 0c2299c5a6..6afe2541d5 100644 --- a/c/src/libnetworking/sys/mbuf.h +++ b/c/src/libnetworking/sys/mbuf.h @@ -192,6 +192,7 @@ union mcluster { (void)m_mballoc(1, (_how)); \ if (((_m) = mmbfree) != 0) { \ mmbfree = (_m)->m_next; \ +/* printf( "MGET: %p\n", (_m) ); */ \ mbstat.m_mtypes[MT_FREE]--; \ (_m)->m_type = (_type); \ mbstat.m_mtypes[_type]++; \ @@ -212,6 +213,7 @@ union mcluster { (void)m_mballoc(1, (_how)); \ if (((_m) = mmbfree) != 0) { \ mmbfree = (_m)->m_next; \ +/* printf( "MGETHDR: %p\n", (_m) ); */ \ mbstat.m_mtypes[MT_FREE]--; \ (_m)->m_type = (_type); \ mbstat.m_mtypes[_type]++; \ @@ -272,6 +274,7 @@ union mcluster { */ #define MFREE(_m, _n) \ MBUFLOCK( \ +/* printf( "MFREE: %p\n", (_m) ); */ \ mbstat.m_mtypes[(_m)->m_type]--; \ if ((_m)->m_flags & M_EXT) { \ if ((_m)->m_ext.ext_free) \ -- cgit v1.2.3