Date: Mon, 11 Feb 2013 17:34:38 -0800 From: Kirk McKusick <mckusick@mckusick.com> To: John Baldwin <jhb@freebsd.org> Cc: Adrian Chadd <adrian@freebsd.org>, Christoph Mallon <christoph.mallon@gmx.de>, Andriy Gapon <avg@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: Proposal: Unify printing the function name in panic messages() Message-ID: <201302120134.r1C1Ycfh026347@chez.mckusick.com> In-Reply-To: <CAJ-Vmokt%2Byq7WMpW0S5Kzy7y1EFGU6g6pHt=QuoZ-zs%2BG-U0BQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I have recently gone down several ratholes trying to understand a panic message which had the wrong function name (prefix ufs1_ instead of ufs2_). I can definitely say that it matters to me. And I think that fixing the problem as Christoph has outlined will be a big step in the right direction. John, in your code you cannot expect to match the entire panic string if it has any % formats in it. So to be useful, you must be able to work with a constant subset of the string. The addition of other information such as a function name at the start should not affect that constant part that you are trying to match. Though a bit ugly, I do think that the change should use "PANIC" rather than overloading "panic". First, it lets the feature be introduced over time rather than requiring that every panic be changed at once. And, it allows historic panic's to work as expected. Finally, having it as a macro means that folks can readily and consistently add file and/or line numbers to panic messages if they wish to do so. Summary: I think that this is an excellent idea that will both help in finding the location of panic errors and also will allow folks trying to minimize kernel size to do so by cutting out the overhead. Kirk McKusick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302120134.r1C1Ycfh026347>