From owner-freebsd-arch@FreeBSD.ORG Wed Feb 13 20:04:30 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2B66BABE; Wed, 13 Feb 2013 20:04:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0862BCC5; Wed, 13 Feb 2013 20:04:30 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 802C0B9B0; Wed, 13 Feb 2013 15:04:29 -0500 (EST) From: John Baldwin To: Adrian Chadd Subject: Re: Proposal: Unify printing the function name in panic messages() Date: Wed, 13 Feb 2013 15:04:18 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201302120134.r1C1Ycfh026347@chez.mckusick.com> <201302131038.57250.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Message-Id: <201302131504.19142.jhb@freebsd.org> Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 13 Feb 2013 15:04:29 -0500 (EST) Cc: Kirk McKusick , Christoph Mallon , Andriy Gapon , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 20:04:30 -0000 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). -- John Baldwin