From owner-freebsd-arch@FreeBSD.ORG Wed Feb 13 01:22:41 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 B2E86650; Wed, 13 Feb 2013 01:22:41 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 51CEAD8; Wed, 13 Feb 2013 01:22:41 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 2FFCF64F5; Wed, 13 Feb 2013 01:22:40 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id F15DFA2FC; Wed, 13 Feb 2013 02:22:39 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mehmet Erol Sanliturk 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> <86fw11homa.fsf@ds4.des.no> Date: Wed, 13 Feb 2013 02:22:39 +0100 In-Reply-To: (Mehmet Erol Sanliturk's message of "Tue, 12 Feb 2013 03:24:13 -0800") Message-ID: <86vc9xf1nk.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Kirk McKusick , Christoph Mallon , Andriy Gapon , 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: Wed, 13 Feb 2013 01:22:41 -0000 Mehmet Erol Sanliturk writes: > My intention was to say a message like the following : > > In line < number > in routine < name > the error < name of error > has > occurred > called from line < number > of routine < name > , > . > . > . > called from line < number > of routine < name > . Keeping track of file names and line numbers for the entire kernel require huge amounts of space, both on disk and in memory. For 9.1 amd64, GENERIC + all modules weigh in at 62 MB, while the debugging symbols (file names, line numbers and variable names) add 267 MB. Even counting only what's actually in use on a typical machine, like the one I'm typing on right now, we get 18 MB of code + 80 MB of symbols. Don't forget that we need debugging symbols for every single line of code, not just those that call panic(), because a) we want to unwind the stack from the point where panic() was called and b) pretty much any non-trivial C statement can potentially trigger a panic due to a bad pointer or array index, a smashed stack, or any number of reasons. > In "Witness" mode , a list is displayed by hexadecimal addresses . and that's all you're going to get... although when an actual panic occurs, you get a core dump which you can later examine with a debugger, which will give you far more information than a simple stack trace. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no