Added printf()'s that can be uncommented to trace MBUF operations. This

is very useful when debugging a device driver.
This commit is contained in:
Joel Sherrill
1999-02-04 15:00:14 +00:00
parent 83c7b007fd
commit 354b00bc1e
4 changed files with 12 additions and 0 deletions

View File

@@ -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) \

View File

@@ -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) \

View File

@@ -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) \

View File

@@ -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) \