Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Feb 2013 12:30:19 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Christoph Mallon <christoph.mallon@gmx.de>
Cc:        Kirk McKusick <mckusick@mckusick.com>, freebsd-arch@FreeBSD.org
Subject:   Re: Proposal: Unify printing the function name in panic messages()
Message-ID:  <5116253B.6030201@FreeBSD.org>
In-Reply-To: <51161C10.9070002@gmx.de>
References:  <51141E33.4080103@gmx.de> <511426B8.2070800@FreeBSD.org> <51160E06.1070404@gmx.de> <20130209195417.C1753@besplex.bde.org> <51161C10.9070002@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5116253B.6030201>