On Thu, Jan 21, 2016 at 1:52 AM, Andriy Gapon <a...@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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"