Date: Thu, 21 Jan 2016 21:18:03 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: cem@FreeBSD.org Cc: Mark Johnston <markj@FreeBSD.org>, Ravi Pokala <rpokala@mac.com>, Adrian Chadd <adrian.chadd@gmail.com>, Andriy Voskoboinyk <avos@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>, "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org> Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan Message-ID: <56A12EEB.3040906@FreeBSD.org> In-Reply-To: <CAG6CVpXKKcuKh-Y_F%2BAs=Ti2DqFnrd__sgOCZxYyphd16euAqw@mail.gmail.com> References: <201601202327.u0KNR2Hh066219@repo.freebsd.org> <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com> <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com> <20160121012825.GA9303@wkstn-mjohnston.west.isilon.com> <56A0AA58.3070704@FreeBSD.org> <CAG6CVpXKKcuKh-Y_F%2BAs=Ti2DqFnrd__sgOCZxYyphd16euAqw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21/01/2016 19:25, Conrad Meyer wrote: > On Thu, Jan 21, 2016 at 1:52 AM, Andriy Gapon <avg@freebsd.org> wrote: >> On 21/01/2016 03:28, Mark Johnston wrote: >>> Isilon has done ad-hoc implementations of this for bufs and mbufs, and >>> they're quite handy for debugging. With BUF_TRACKING enabled in our >>> kernel config, each buf contains a const char *b_records[32], and one >>> adds >>> >>> buf_track(bp, __func__); >>> >>> or so to various functions to record an entry in the buf when the >>> function is invoked. >> >> Does your extension also save a stack trace? >> I would love to have something like that for the memory allocation and >> deallocation audit. > > No, just a pointer to a constant string (function name or similar). I > think stacks would take up a huge amount of space relative to the size > of a buf (~1kB), rather than just a little bit more space :-). Well, 15 or so addresses on amd64 would take 120 bytes and if they go to a circular buffer, then it should not matter that much. > I worked on a project involving buffers and found the tracking very > handy. Something less ad-hoc would be useful to have. Indeed! -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56A12EEB.3040906>