From owner-svn-src-all@FreeBSD.ORG Tue Mar 10 10:30:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03D26445; Tue, 10 Mar 2015 10:30:50 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A514240; Tue, 10 Mar 2015 10:30:48 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2AAUkIK010582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Mar 2015 13:30:46 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2AAUkRr010581; Tue, 10 Mar 2015 13:30:46 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 10 Mar 2015 13:30:46 +0300 From: Gleb Smirnoff To: Konstantin Belousov Subject: Re: svn commit: r279764 - head/sys/vm Message-ID: <20150310103046.GV17947@FreeBSD.org> References: <201503080213.t282DlXj012465@svn.freebsd.org> <20150310100141.GS17947@FreeBSD.org> <20150310101812.GS2379@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150310101812.GS2379@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2015 10:30:50 -0000 On Tue, Mar 10, 2015 at 12:18:13PM +0200, Konstantin Belousov wrote: K> On Tue, Mar 10, 2015 at 01:01:41PM +0300, Gleb Smirnoff wrote: K> > On Sun, Mar 08, 2015 at 02:13:47AM +0000, Konstantin Belousov wrote: K> > K> Author: kib K> > K> Date: Sun Mar 8 02:13:46 2015 K> > K> New Revision: 279764 K> > K> URL: https://svnweb.freebsd.org/changeset/base/279764 K> > K> K> > K> Log: K> > K> Fix function name in the panic message. K> > K> > Why not use "%s, __func__" always and never encounter this problem K> > in future? K> K> Because you cannot grep for the panic string when __func__ is used. Grepping for panic string doesn't work in general. A panic message can report pointers or numbers, which make text not unique. Actually, the messages that do report extra information are more useful. Also, if panic string resides in the source code under several levels of indentation, it is likely to be split into two lines. But you can always grep for the function name and locate the panic or KASSERT in the function manually, which isn't a big deal. And if %s, __func__ is used, you will never get to a wrong function. -- Totus tuus, Glebius.