From owner-freebsd-arch@FreeBSD.ORG Sat Feb 9 08:51:51 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 B015DA74 for ; Sat, 9 Feb 2013 08:51:51 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by mx1.freebsd.org (Postfix) with ESMTP id 37A83EB8 for ; Sat, 9 Feb 2013 08:51:50 +0000 (UTC) Received: from mailout-de.gmx.net ([10.1.76.35]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0M38or-1UtioD0o47-00srxa for ; Sat, 09 Feb 2013 09:51:50 +0100 Received: (qmail invoked by alias); 09 Feb 2013 08:51:46 -0000 Received: from p5B132F8B.dip.t-dialin.net (EHLO rotluchs.lokal) [91.19.47.139] by mail.gmx.net (mp035) with SMTP; 09 Feb 2013 09:51:46 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+XsO9v6R2XFN3z8J8TXtMYdJ94IeLHfxJ9EX48/d Z1zxNQSI/LH3N+ Message-ID: <51160E06.1070404@gmx.de> Date: Sat, 09 Feb 2013 09:51:18 +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> In-Reply-To: <511426B8.2070800@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: Sat, 09 Feb 2013 08:51:51 -0000 On 07.02.2013 23:12, Andriy Gapon wrote: > on 07/02/2013 23:35 Christoph Mallon said the following: >> panic("just a message"); > > This seems perfect. > Panic without at least a stack trace or preferably a crash dump is practically > useless in most cases. A stack trace already has all the function names. > So a function name in a message seems to be redundant. This is nice in theory, but infeasible in practice. More than half of the panic() calls include the correct function name in a way or another. I estimate, that another quarter show a wrong name. It is hard to get this number mechanically, because, well, the names are wrong. So most calls include the name (or try to). Having no function name is a minority. I plan to correct and unify this hotchpotch. Also, if stack traces are disabled, you at least can reliably determine, where the panic came from. Finally, you can turn the names on and off with one central switch. Christoph