svn commit: r294471 - head/sys/dev/usb/wlan
Andriy Gapon
avg at FreeBSD.org
Thu Jan 21 19:19:10 UTC 2016
On 21/01/2016 19:25, Conrad Meyer wrote:
> On Thu, Jan 21, 2016 at 1:52 AM, Andriy Gapon <avg at 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
More information about the svn-src-all
mailing list