From owner-freebsd-current@FreeBSD.ORG Wed Nov 9 01:03:25 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E4B4106566B; Wed, 9 Nov 2011 01:03:25 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4C58FC0A; Wed, 9 Nov 2011 01:03:23 +0000 (UTC) Received: by wyg36 with SMTP id 36so1540731wyg.13 for ; Tue, 08 Nov 2011 17:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ArcCqKsZvSxr/oVxnoHwhAZyhINMncdXVEBPWhnLhSQ=; b=CKwq7bFdIps8n38e8D0U9Qj1yjW+4gEF9JdEbTkT/57KWZLEJ18jN1Iqn6zW9iLZKa NMAz66k/bMV4bLqkCByWwe7iRM7xhtdaAwKGNQVACrEWO6A7G3p1BdtL1qKxoj7OBDcj 12zRyd613eQ8U3gzHXK+OjjtflklveUgd2No8= MIME-Version: 1.0 Received: by 10.180.89.5 with SMTP id bk5mr149710wib.60.1320800602964; Tue, 08 Nov 2011 17:03:22 -0800 (PST) Received: by 10.180.81.200 with HTTP; Tue, 8 Nov 2011 17:03:22 -0800 (PST) In-Reply-To: <4EB9C469.9070208@freebsd.org> References: <4EB9C469.9070208@freebsd.org> Date: Tue, 8 Nov 2011 20:03:22 -0500 Message-ID: From: Arnaud Lacombe To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "K. Macy" , Alan Cox , Andriy Gapon , Attilio Rao , freebsd-current@freebsd.org, Benjamin Kaduk , Kostik Belousov , Penta Upa Subject: Re: Using Instruction Pointer address in debug interfaces [Was: Re: vm_page_t related KBI [Was: Re: panic at vm_page_wire with FreeBSD 9.0 Beta 3]] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2011 01:03:25 -0000 Hi, On Tue, Nov 8, 2011 at 7:08 PM, Julian Elischer wrote: > On 11/8/11 10:49 AM, Arnaud Lacombe wrote: >> >> Hi, >> To avoid future complaints about the fact that I would be only "talk" >> without "action", I did implement what I suggested above. As it is >> quite a large patch-set, I will not post it directly here, however, it >> is available on github: >> >> https://github.com/lacombar/freebsd/tree/master/topic/kern-lock-debug >> >> It convert a bunch of debug interface to use the caller instruction >> pointer, as well as a proof-of-concept teaching printf(9) to convert >> IP to symbol_name+offset. >> >> It translates in a direct saving of about +250kB on i386's GENERIC, >> just in kernel text size. Even the worst case, ie LOCK_DEBUG =3D=3D 0, >> translates to a save of +80kB. >> >> Please note that this is still WIP code. > > A couple of comments. > Firstly, the idea of a printf method to print the IP as symbol+offset is = an > interesting idea > that should be followed up in its own right. > > However, (comment 2) =A0I would much rather file+line in this case. > I don't want to have the tools to decode the offset into a location in > sources. > this already exists and is called "debug symbols" - Arnaud > We have both systems in operation art work and I far prefer the latter. > >