From owner-freebsd-stable Fri May 5 19:21:24 2000 Delivered-To: freebsd-stable@freebsd.org Received: from mail3.gmx.net (mail.gmx.net [194.221.183.63]) by hub.freebsd.org (Postfix) with SMTP id BB7BF37BDF4 for ; Fri, 5 May 2000 19:21:17 -0700 (PDT) (envelope-from Gerhard.Sittig@gmx.net) Received: (qmail 4563 invoked by uid 0); 6 May 2000 02:21:15 -0000 Received: from pc19f5ad4.dip.t-dialin.net (HELO speedy.gsinet) (193.159.90.212) by mail.gmx.net with SMTP; 6 May 2000 02:21:15 -0000 Received: (from sittig@localhost) by speedy.gsinet (8.8.8/8.8.8) id WAA18111 for freebsd-stable@FreeBSD.ORG; Fri, 5 May 2000 22:24:52 +0200 Date: Fri, 5 May 2000 22:24:52 +0200 From: Gerhard Sittig To: freebsd-stable@FreeBSD.ORG Subject: Re: Debugging Kernel/System Crashes, can anyone help?? Message-ID: <20000505222452.T11903@speedy.gsinet> Mail-Followup-To: freebsd-stable@FreeBSD.ORG References: <20000503185936.E72341@ethereal.net> <20000504095941.B18453@freebie.lemis.com> <200005040124.VAA55655@account.abs.net> <20000504111136.B22025@freebie.lemis.com> <20000503185936.E72341@ethereal.net> <20000504114013.E22025@freebie.lemis.com> <4.3.2.20000503221040.02051d40@207.227.119.2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <4.3.2.20000503221040.02051d40@207.227.119.2>; from jeff-ml@mountin.net on Thu, May 04, 2000 at 05:00:35PM -0500 Organization: System Defenestrators Inc. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, May 04, 2000 at 17:00 -0500, Jeffrey J. Mountin wrote: > > [ ... installing nonstripped kernel when building -g ... ] > > Running the non-stripped kernel uses more memory and isn't > there also a performance issue. Also what is gained by running > it, as long as you have the complimentary debug kernel in > /var/crash (or wherever) for the stripped boot kernel. Are you sure about these facts? I'm tempted to speak against both points: The symbols are in the executable file only and won't make it into physical memory unless they're referenced (which should happen only when linkers or debuggers need them). And the performance penalty comes from extra checks (inserted by the compiler or #ifdef'ed) or different stack frames for compiling with "-g", _not_ from not stripping symbols off. So "nothing's gained" except a little more consistency or - to put it in other words - there's a loss of potential irritation :) And in addition as was stated before, keeping a stripped and an unstripped version on your disk is more expensive in terms of space than just holding one non-stripped version. And what I missed in the previous discussion: How "normal" is it to have more than three kernel images around so that their symbols fill up a (too small sized?) root filesystem? The only environments that come to mind are kernel developer machines or "toys" for curious people compiling kernels "for fun". Both of them should know what they do. I feel everyday users would just have one GENERIC (stripped) kernel around from install time and one or two generations of selfmade kernels -- once the new one has proven to work the former might disappear, but I never see a need in keeping more of them around. > Pretty sure past discussions say nothing is gained, but some is > lost by running kernel.debug rather than the stripped kernel. > Maybe I missed something. I wouldn't mix "debug" and "stripped" in this way -- they're completely orthogonal to me. Unless *I* missed a point :) > I do agree with building, but not installing, a debug kernel. I thought the discussion went like this: - When everything's fine, run a non-debug kernel. - When you have problems you feel like digging into, build a debug kernel. - To gain real knowledge from the debugging session, you need symbols. Please correct me if I'm wrong. But this leads me to "What's the use in compiling with "-g" and stripping symbols off the installed copy when you have to keep the unstripped version somewhere anyway?". Do unstripped executables really eat more resources when run? Does it matter in today's memory management environments (demand paging) if the symbol's segment is "loaded" at all)? virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message