Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Feb 2013 09:51:18 +0100
From:      Christoph Mallon <christoph.mallon@gmx.de>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        Kirk McKusick <mckusick@mckusick.com>, freebsd-arch@FreeBSD.org
Subject:   Re: Proposal: Unify printing the function name in panic messages()
Message-ID:  <51160E06.1070404@gmx.de>
In-Reply-To: <511426B8.2070800@FreeBSD.org>
References:  <51141E33.4080103@gmx.de> <511426B8.2070800@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07.02.2013 23:12, Andriy Gapon wrote:
> on 07/02/2013 23:35 Christoph Mallon said the following:
>> panic("just a message");
> 
> This seems perfect.
> Panic without at least a stack trace or preferably a crash dump is practically
> useless in most cases.  A stack trace already has all the function names.
> So a function name in a message seems to be redundant.

This is nice in theory, but infeasible in practice.
More than half of the panic() calls include the correct function name in a way or another.
I estimate, that another quarter show a wrong name.
It is hard to get this number mechanically, because, well, the names are wrong.
So most calls include the name (or try to).
Having no function name is a minority.
I plan to correct and unify this hotchpotch.
Also, if stack traces are disabled, you at least can reliably determine, where the panic came from.
Finally, you can turn the names on and off with one central switch.

	Christoph



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51160E06.1070404>