From owner-freebsd-arch@FreeBSD.ORG Sat Feb 9 10:30:42 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 067E9778 for ; Sat, 9 Feb 2013 10:30:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4DE65256 for ; Sat, 9 Feb 2013 10:30:40 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA19877; Sat, 09 Feb 2013 12:30:20 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1U47hM-0007on-Iy; Sat, 09 Feb 2013 12:30:20 +0200 Message-ID: <5116253B.6030201@FreeBSD.org> Date: Sat, 09 Feb 2013 12:30:19 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130121 Thunderbird/17.0.2 MIME-Version: 1.0 To: Christoph Mallon Subject: Re: Proposal: Unify printing the function name in panic messages() References: <51141E33.4080103@gmx.de> <511426B8.2070800@FreeBSD.org> <51160E06.1070404@gmx.de> <20130209195417.C1753@besplex.bde.org> <51161C10.9070002@gmx.de> In-Reply-To: <51161C10.9070002@gmx.de> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Kirk McKusick , freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2013 10:30:42 -0000 on 09/02/2013 11:51 Christoph Mallon said the following: > On 09.02.2013 10:26, Bruce Evans wrote: > > I knew, this would happen, the moment I typed "ancient god". > >> Name lookup from the return address is broken for inline functions and >> for other optimizations like tail calls, but much more is broken for >> stack traces. > > Thank you for contributing to my case. > > As bde points out, optimisations interfere with location information gathered at runtime. > Having the right name of the function in the panic, ensures that at least the starting point is right. > My PANIC() macro guarantees exactly this. Optimizations, inlining are completely irrelevant. If the inlined function is inlined in just one place, then there is no difference. If it is inlined in multiple places, then you would need to know where it is inlined and for that you know a stack trace. The function name alone just doesn't carry as much significance as you attribute to it. -- Andriy Gapon