From owner-freebsd-arch@FreeBSD.ORG Tue Feb 12 06:32:53 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 16BC0516 for ; Tue, 12 Feb 2013 06:32:53 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by mx1.freebsd.org (Postfix) with ESMTP id 85080729 for ; Tue, 12 Feb 2013 06:32:52 +0000 (UTC) Received: from mailout-de.gmx.net ([10.1.76.34]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0Mb5SX-1UKlQm1mIt-00KdaS for ; Tue, 12 Feb 2013 07:32:51 +0100 Received: (qmail invoked by alias); 12 Feb 2013 06:32:50 -0000 Received: from p5B13243E.dip.t-dialin.net (EHLO rotluchs.lokal) [91.19.36.62] by mail.gmx.net (mp034) with SMTP; 12 Feb 2013 07:32:50 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX18gcyNtmTYgY45IfZ9hIlEdN+VdVZ1OeDOnDSxs6z yXiim2JpRjbOcI Message-ID: <5119E20A.4010902@gmx.de> Date: Tue, 12 Feb 2013 07:32:42 +0100 From: Christoph Mallon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130129 Thunderbird/17.0.2 MIME-Version: 1.0 To: mike@karels.net Subject: Re: Proposal: Unify printing the function name in panic messages() References: <201302120601.r1C617Q9006038@mail.karels.net> In-Reply-To: <201302120601.r1C617Q9006038@mail.karels.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: Kirk McKusick , Adrian Chadd , 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: Tue, 12 Feb 2013 06:32:53 -0000 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