From owner-freebsd-arch@FreeBSD.ORG Mon Feb 11 10:16:08 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 3403429C for ; Mon, 11 Feb 2013 10:16:08 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by mx1.freebsd.org (Postfix) with ESMTP id C638618C9 for ; Mon, 11 Feb 2013 10:16:07 +0000 (UTC) Received: from mailout-de.gmx.net ([10.1.76.10]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0M1Tap-1UtWF52JhZ-00tPWX for ; Mon, 11 Feb 2013 11:16:06 +0100 Received: (qmail invoked by alias); 11 Feb 2013 10:16:06 -0000 Received: from p5B1326F3.dip.t-dialin.net (EHLO rotluchs.lokal) [91.19.38.243] by mail.gmx.net (mp010) with SMTP; 11 Feb 2013 11:16:06 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX19uDuw2fUZuUhRPS/80VfqOpYxfwRsYf8zpJL2e+I PGt2XCprr/342k Message-ID: <5118C4E4.6020706@gmx.de> Date: Mon, 11 Feb 2013 11:16:04 +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: Andriy Gapon Subject: Re: Proposal: Unify printing the function name in panic messages() References: <51141E33.4080103@gmx.de> <511426B8.2070800@FreeBSD.org> <51160E06.1070404@gmx.de> <5116121E.1010601@FreeBSD.org> <511616AC.8080306@gmx.de> <511622A2.2090601@FreeBSD.org> In-Reply-To: <511622A2.2090601@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: Kirk McKusick , 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: Mon, 11 Feb 2013 10:16:08 -0000 On 09.02.2013 11:19, Andriy Gapon wrote: > on 09/02/2013 11:28 Christoph Mallon said the following: >> I do not understand, what the problem is. >> There are bugs and cumbersome code. >> This simple changes solves it. > > You conveniently omitted some questions of mine. > I'll reproduce them: > Well, have you experienced any problems with debugging due to those > (absent/misleading) function names? Or do you see many reports about such problems? I have dropped them, because they are not relevant. Though, I have answered them, but I'll rephrase it. There are many easily -- i.e., not needing any manual intervention -- avoidable bugs and inconsistencies in the code, which can be remedied by a simple change. Further, the change simplifies the user side of panic() a bit. Does bad code require a bug report to be fixed? If you think so, then just read "Proposal" in the topic as "Bug report and patch". > So I conclude that this is indeed a solution in search of a problem. > And that's exactly why i don't like it: > - a lot of lines changed for no good reason Incorrect information is corrected. Needlessly different ways to achieve the same thing are unified. panic calls are simplified a bit. > - code looks uglier / more obfuscated due to macro(s) As Alfred pointed out, we can just name it panic. Also the macro is quite similar to the typical assert macro in the way it automatically aggregates additional information. This does not obfuscate the code. > - no clear benefit, because there is no clear problem that needs solving See above. Christoph