Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2013 09:34:33 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Kirk McKusick <mckusick@mckusick.com>
Cc:        Adrian Chadd <adrian@freebsd.org>, Christoph Mallon <christoph.mallon@gmx.de>, Andriy Gapon <avg@freebsd.org>, mike@karels.net, freebsd-arch@freebsd.org
Subject:   Re: Proposal: Unify printing the function name in panic messages()
Message-ID:  <5DCB8A72-ABD8-4E8B-8595-EDEBEE70C6AB@bsdimp.com>
In-Reply-To: <201302120615.r1C6FpP8086860@chez.mckusick.com>
References:  <201302120615.r1C6FpP8086860@chez.mckusick.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Feb 11, 2013, at 11:15 PM, Kirk McKusick wrote:

>> To: Kirk McKusick <mckusick@mckusick.com>
>> cc: John Baldwin <jhb@freebsd.org>, Adrian Chadd =
<adrian@freebsd.org>,
>>        Christoph Mallon <christoph.mallon@gmx.de>,
>>        Andriy Gapon <avg@freebsd.org>, freebsd-arch@freebsd.org
>> From: Mike Karels <mike@karels.net>
>> Subject: Re: Proposal: Unify printing the function name in panic =
messages()=20
>> Date: Tue, 12 Feb 2013 00:01:07 -0600
>>=20
>> 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.  That is a simpler problem to handle, and isn't handled =
by
>> the current proposal as I understand it.
>>=20
>> 		Mike
>=20
> Though the default for the current proposal gives just the function =
name,
> in its verbose mode it give file, function, and line number. And in =
its
> lean and mean mode, just the error string. This replacing the =
hodge-podge
> that we have now. My main point is that it is a significant =
improvement
> over what we have now.

I'm all for consistency, and I'm also all for having knobs that let =
people limit what is printed. In some environments, I'd love to have the =
file/line number. Why? Because I'm lazy and it saves me a grep: I'd be =
trading space for convenience. In others, where I'm more space =
constrained, I'd love to just have the raw message and suffer the =
ambiguity we have today (or fix things so they aren't ambiguous).

I too am having difficulty understanding the resistance to the basic =
proposal:
(1) Make panic messages suck less by removing bogus function names.
(2) Hack the panic() to make it a macro so you can add function name or =
file + line or the MJD of the last leap second to the panic messages.

(1) is like no-brainer yes. (2) is infinite bike-shed land, but if we =
have the basic macro there, maybe with a simple/gaudy kernel config then =
people that want a different kind of gaudy have an easy hack.

I'm still having trouble seeing the down side, except maybe your brand =
of gaudy is considered too passe' to be allowed in :)

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5DCB8A72-ABD8-4E8B-8595-EDEBEE70C6AB>