Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2013 07:32:42 +0100
From:      Christoph Mallon <christoph.mallon@gmx.de>
To:        mike@karels.net
Cc:        Kirk McKusick <mckusick@mckusick.com>, Adrian Chadd <adrian@freebsd.org>, Andriy Gapon <avg@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: Proposal: Unify printing the function name in panic messages()
Message-ID:  <5119E20A.4010902@gmx.de>
In-Reply-To: <201302120601.r1C617Q9006038@mail.karels.net>
References:  <201302120601.r1C617Q9006038@mail.karels.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12.02.2013 07:01, Mike Karels wrote:
>> I have having difficulty understanding the resistance to bringing
>> consistency to something that badly lacks it now. Along with the
>> ability to get rid of the extra space when needed or to add to it
>> when desired. The arguement that it is crap, but who cares because
>> we can work around it when we have someone offering to do the not
>> insignificant work to clean it up seems out of character with our
>> vision of a clean code base.
> 
> I'm not arguing against consistency, nor even agaist the proposal itself
> (as modified for a lower-case panic macro).  However,  I don't think the
> lack of consistency is the real problem.  "panic: watchdog timeout" tells
> me what I need to know, whether or not it includes "watchdog_fire" or the
> line number.  The only problem that has been pointed out is lack of
> uniqueness.

The only problem?
Wrong information is no problem?

> That is a simpler problem to handle, and isn't handled by
> the current proposal as I understand it.

How does adding the function name (or by extension the file name and line number) not make it unique (almost unique for the function name)?

Also, this seems to be a case of scope creep:
I want to make the use of panic
- simpler, by not having to manually maintain the function name, which the compiler can do better and you do not have to type anything at all
- consistent, whereas currently there are about a dozen styles how to cram location info into panic messages
- and remove some existing bugs
As nice bonus, the change also provides a base for further improvements by using a macro PANIC instead of a plain function.
But this is not the main goal, the points before are.
I went for the plain function name, instead of file+line, because this is, what the majority of panic calls do.

	Christoph



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5119E20A.4010902>