Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jan 2016 09:25:51 -0800
From:      Conrad Meyer <cem@FreeBSD.org>
To:        Andriy Gapon <avg@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:  <CAG6CVpXKKcuKh-Y_F%2BAs=Ti2DqFnrd__sgOCZxYyphd16euAqw@mail.gmail.com>
In-Reply-To: <56A0AA58.3070704@FreeBSD.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 :-).

I worked on a project involving buffers and found the tracking very
handy.  Something less ad-hoc would be useful to have.

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpXKKcuKh-Y_F%2BAs=Ti2DqFnrd__sgOCZxYyphd16euAqw>