Add the MBUF_DEBUG option. This is a fairly invasive option that should
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 9 Aug 2007 01:10:06 +0000 (01:10 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 9 Aug 2007 01:10:06 +0000 (01:10 +0000)
commite9fa4b60a44160d6c27aec9583a40e971419405c
tree05548597b4a82975d272f9791433e13ffbebb550
parentee38db90e6f5a528d42e4285371ddff278a8c59c
Add the MBUF_DEBUG option.  This is a fairly invasive option that should
not be used on production boxes.  All active mbufs are tracked with a separate
tracking structure and arranged in a RB tree.  A kernel built with this
option can dump all active mbufs with 'sysctl kern.ipc.showmbufs'.

A person debugging the kernel can sprinkle mbuftrackid() calls in the code
to associate an integer id with an mbuf to make the sysctl output more
useful.

The size of the mbuf structure is NOT changed through the use of this option,
but mbuf management overhead will be increased.
sys/conf/options
sys/kern/uipc_mbuf.c
sys/kern/uipc_sockbuf.c
sys/net/route.c
sys/net/rtsock.c
sys/sys/mbuf.h