From owner-svn-src-all@freebsd.org Thu Jan 21 18:32:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE697A8CC47; Thu, 21 Jan 2016 18:32:24 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8572F1F1F; Thu, 21 Jan 2016 18:32:24 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yk0-f181.google.com with SMTP id a85so58567199ykb.1; Thu, 21 Jan 2016 10:32:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=B3rUzcDAOLUZt+CY5QE78iWIHmja5luWHDlTiY1hu5w=; b=LvE0Tf3kDwx9q9VUAYxUvN65dR3eYgckpv9+7ddEhRgQ5JRXUaSf3X1cA8Ht9tAhAI S8wilh951bvAKSW0qE2snLqRD4R+5dadi5E/zKJDV8uSr7kVVs5+Cb6dO6EwlYFo9Kyp ws7eZvUV/1zEVe87WMPHw5iXeePgQjNY5VX8m45Uy/2weW42rpOFTmBXNPZYhtpi3wnh XiwgcXWIlDsjE8hdtP+QeFMkB4/67YVpWin0eHklWSbvouGSmtz4yvXPt084748ISv5S UZ0JYcgVgaaljAZywyyTVI97ajCErnR3LsasylA5TgiKIigGNFJ+yhzNXbgt2VOoFjdw ptnw== X-Gm-Message-State: ALoCoQlW29ZGFPYJDHbGXo4XcjifSBJ3oQbPwK6/ae3y9rV72tlzUyJBK/ebGiiCx7gQGGJyG6Bf7Dooi0Y4YWZPut+xx9Gatw== X-Received: by 10.13.215.194 with SMTP id z185mr27207833ywd.304.1453397152489; Thu, 21 Jan 2016 09:25:52 -0800 (PST) Received: from mail-yk0-f180.google.com (mail-yk0-f180.google.com. [209.85.160.180]) by smtp.gmail.com with ESMTPSA id 204sm1281910ywz.39.2016.01.21.09.25.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jan 2016 09:25:52 -0800 (PST) Received: by mail-yk0-f180.google.com with SMTP id s126so31295437ykf.2; Thu, 21 Jan 2016 09:25:51 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.37.82.8 with SMTP id g8mr14744867ybb.91.1453397151888; Thu, 21 Jan 2016 09:25:51 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.4.69 with HTTP; Thu, 21 Jan 2016 09:25:51 -0800 (PST) In-Reply-To: <56A0AA58.3070704@FreeBSD.org> References: <201601202327.u0KNR2Hh066219@repo.freebsd.org> <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com> <20160121012825.GA9303@wkstn-mjohnston.west.isilon.com> <56A0AA58.3070704@FreeBSD.org> Date: Thu, 21 Jan 2016 09:25:51 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan From: Conrad Meyer To: Andriy Gapon Cc: Mark Johnston , Ravi Pokala , Adrian Chadd , Andriy Voskoboinyk , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2016 18:32:24 -0000 On Thu, Jan 21, 2016 at 1:52 AM, Andriy Gapon 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