Date: Tue, 10 Mar 2015 13:30:46 +0300 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r279764 - head/sys/vm Message-ID: <20150310103046.GV17947@FreeBSD.org> In-Reply-To: <20150310101812.GS2379@kib.kiev.ua> References: <201503080213.t282DlXj012465@svn.freebsd.org> <20150310100141.GS17947@FreeBSD.org> <20150310101812.GS2379@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150310103046.GV17947>