Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2013 15:11:13 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-arch@freebsd.org
Cc:        Kirk McKusick <mckusick@mckusick.com>, Adrian Chadd <adrian@freebsd.org>, Christoph Mallon <christoph.mallon@gmx.de>, Andriy Gapon <avg@freebsd.org>
Subject:   Re: Proposal: Unify printing the function name in panic messages()
Message-ID:  <201302131511.14019.jhb@freebsd.org>
In-Reply-To: <201302131504.19142.jhb@freebsd.org>
References:  <201302120134.r1C1Ycfh026347@chez.mckusick.com> <CAJ-Vmo=wwFD7_OF%2BFdJkPyxjQD_4y-yBU6guUHTuCkFr%2BoYh-w@mail.gmail.com> <201302131504.19142.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, February 13, 2013 3:04:18 pm John Baldwin wrote:
> On Wednesday, February 13, 2013 2:23:06 pm Adrian Chadd wrote:
> > ... I hate to be a jerk, but something tells me that relying on the
> > output of text strings as to the panic cause and then parsing those is
> > maybe not the right thing to do.
> > 
> > If it were me, I'd do something like the gettext string API - ie,
> > panic wouldn't take a string, but a panic string ID, which would
> > translate to an enum as well as map to a string.. then you could pull
> > that off.
> 
> Look, I've had these tests private for years and have used them when working 
> on locking primitives.  If you don't want them in the tree I can save myself a 
> whole lot of work and not try to clean them up and update them for rmlocks 
> (where I'm attempting to expand my tests to test some fixes I have to rmlocks 
> because I prefer to thoroughly test the changes I make to locking primitives 
> before I commit them).

*sigh*

This is too snarky, and I apologize.  Futz with panic messages all you want.
I strongly doubt it will make one iota of difference in debugging non-developer
issues since 99.9% of all panics reported by users are page faults and having a
"trap_fatal:" prefix to the panic string just doesn't add any useful contents.
I'll just update my tests to cope.

I'm not i18n'ing panic messages.  I'll still work on my unit tests for at least
my own use as I can't bear commits to primitives that aren't well tested.

-- 
John Baldwin



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