Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 1999 11:03:18 -0500
From:      The Classiest Man Alive <ksmm@threespace.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        FreeBSD Hackers <hackers@FreeBSD.ORG>
Subject:   Re: Debug kernel by default (was: System size with -g)
Message-ID:  <199903311623.LAA27893@geek.grf.ov.com>
In-Reply-To: <19990331165139.W413@lemis.com>
References:  <19990331003535.E17547@futuresouth.com> <19990331003535.E17547@futuresouth.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Has anybody looked at this from a performance perspective?  In other words,
does the system become any more sluggish or less responsive as a result of
this?

K.S.


At 02:21 AM 3/31/99 , Greg Lehey wrote:
>On Wednesday, 31 March 1999 at  0:35:35 -0600, Matthew D. Fuller wrote:
>> I know this is what most people will think of as a Very Bad Idea From The
>> Get-Go, but I'm curious in any event.
>> What sort of impact on size(disk)/size(memory)/startup time/etc would
>> compiling the entire system with debugging symbols be?  (i.e., put -g in
>> CFLAGS in make.conf)  Double the size of the base system?  Quintuple?
>
>Interestingly enough, we are currently discussing this in -hackers.
>We're thinking about changing the way the kernel is built so that a
>debug kernel will be the default.
>
>To answer your question: a typical (partially) stripped kernel is
>about 1.8 MB in size.  The corresponding debug kernel is about 9 MB
>(since ELF; a.out debug kernels are about 3 MB larger).  This space is
>*in memory at all times*, so you don't normally want to load it, but
>it's good to have for dump analysis.
>
>Here are some comparative figures for building a kernel on my main
>machine (AMD K6-2/333, 160 MB memory):
>
>		normal		debug
>Make all	4:30		5:0
>Kernel size	1.8 MB		9 MB
>Directory size	5.5 MB		24 MB
>
>The directory is so much larger because not only the kernel, but also
>all the object files contain debug symbols.  The difference in
>compilation time assumes lots of RAM; otherwise you could end up with
>a lot of paging and a corresponding increase in compilation time.
>
>The way we're talking now, it looks like we could end up with:
>
>1.  The -g option for config(8) no longer has any meaning.  With or
>    without it, you end up configuring a debug kernel.
>2.  'make install' make a copy of the kernel, called kernel.debug, and
>    strips the original kernel before installing it.
>3.  'make install.debug' would install the debug version of the
>    kernel.  This can be useful for people who use ddb or another
>    in-kernel debugger.  It's not needed for people who use a serial
>    debugger like gdb -k.
>4.  For people for whom the additional memory requirements are a
>    problem, config will have a -s (or similar) option to say 'build a
>    kernel without debugging symbols'.
>
>Any comments?  This is by no means set in stone, and we'll discuss it
>a while before we do anything.
>
>Greg
>--
>When replying to this message, please copy the original recipients.
>For more information, see http://www.lemis.com/questions.html
>See complete headers for address, home page and phone numbers
>finger grog@lemis.com for PGP public key
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-hackers" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903311623.LAA27893>