From owner-freebsd-current@FreeBSD.ORG Wed Nov 9 00:08:26 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 BAE65106564A for ; Wed, 9 Nov 2011 00:08:26 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 882968FC12 for ; Wed, 9 Nov 2011 00:08:26 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id pA9082tY022182 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 8 Nov 2011 16:08:05 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4EB9C469.9070208@freebsd.org> Date: Tue, 08 Nov 2011 16:08:09 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15 MIME-Version: 1.0 To: Arnaud Lacombe References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 00:08:26 -0000 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 == 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) I 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. We have both systems in operation art work and I far prefer the latter.