* compiling kernel with debug and optimization
@ 2003-02-10 11:11 devnetfs
2003-02-10 11:32 ` Keith Owens
2003-02-10 19:23 ` Pavel Machek
0 siblings, 2 replies; 6+ messages in thread
From: devnetfs @ 2003-02-10 11:11 UTC (permalink / raw)
To: linux-kernel
Hello,
Does compiling with -g option degrade performance? IMO it should NOT.
If that's true, then why dont we compile kernels with both -g and -O2
always? Also does using -g AND -O2 cause some optimizations to be
missed out?
Thanks in advance,
Regards,
A.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: compiling kernel with debug and optimization
2003-02-10 11:11 compiling kernel with debug and optimization devnetfs
@ 2003-02-10 11:32 ` Keith Owens
2003-02-10 16:28 ` devnetfs
2003-02-10 19:23 ` Pavel Machek
1 sibling, 1 reply; 6+ messages in thread
From: Keith Owens @ 2003-02-10 11:32 UTC (permalink / raw)
To: devnetfs; +Cc: linux-kernel
On Mon, 10 Feb 2003 03:11:51 -0800 (PST),
devnetfs <devnetfs@yahoo.com> wrote:
>Does compiling with -g option degrade performance? IMO it should NOT.
Compiling with -g slows down compilation and link, mainly because of
the extra debugging data that has to be copied around. -g
significantly increases disk usage.
>If that's true, then why dont we compile kernels with both -g and -O2
>always? Also does using -g AND -O2 cause some optimizations to be
>missed out?
With gcc, compiling with -g should have no effect on the kernel. One
of my occasional tests is to build vmlinux with and without -g, run
both through strip -g and compare the results. They should be
identical except for the build timestamp.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: compiling kernel with debug and optimization
2003-02-10 11:32 ` Keith Owens
@ 2003-02-10 16:28 ` devnetfs
0 siblings, 0 replies; 6+ messages in thread
From: devnetfs @ 2003-02-10 16:28 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
Thanks for you reply Keith :)
The reason I asked this question is -- Distro's like RH (i guess it
holds for others too) DONT distribute kernels compiled with -g and
I was wondering why?
Agreed about the compile-time+disk overhead, but that's ONE time
affair. Analyzing a system-core-dump of a "-g" built kernel (using
MCL's crash) is much easier and fruitful than otherwise.
so is it (just) the disk-space overhead that keeps distributions
from NOT compiling with "-g" option?!
Thanks once again,
Regards,
A.
--- Keith Owens <kaos@ocs.com.au> wrote:
> On Mon, 10 Feb 2003 03:11:51 -0800 (PST),
> devnetfs <devnetfs@yahoo.com> wrote:
> >Does compiling with -g option degrade performance? IMO it should
> NOT.
>
> Compiling with -g slows down compilation and link, mainly because of
> the extra debugging data that has to be copied around. -g
> significantly increases disk usage.
>
> >If that's true, then why dont we compile kernels with both -g and
> -O2
> >always? Also does using -g AND -O2 cause some optimizations to be
> >missed out?
>
> With gcc, compiling with -g should have no effect on the kernel. One
> of my occasional tests is to build vmlinux with and without -g, run
> both through strip -g and compare the results. They should be
> identical except for the build timestamp.
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: compiling kernel with debug and optimization
2003-02-10 11:11 compiling kernel with debug and optimization devnetfs
2003-02-10 11:32 ` Keith Owens
@ 2003-02-10 19:23 ` Pavel Machek
2003-02-12 5:20 ` devnetfs
1 sibling, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2003-02-10 19:23 UTC (permalink / raw)
To: devnetfs; +Cc: linux-kernel
Hi!
> Does compiling with -g option degrade performance? IMO it should NOT.
>
> If that's true, then why dont we compile kernels with both -g and -O2
> always?
Build with -g takes *a lot* of diskspace, like 1Gig.
Pavel
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: compiling kernel with debug and optimization
2003-02-10 19:23 ` Pavel Machek
@ 2003-02-12 5:20 ` devnetfs
0 siblings, 0 replies; 6+ messages in thread
From: devnetfs @ 2003-02-12 5:20 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-kernel
--- Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
> > Does compiling with -g option degrade performance? IMO it should
> > NOT.
> > If that's true, then why dont we compile kernels with both -g and
> > -O2 always?
>
> Build with -g takes *a lot* of diskspace, like 1Gig.
> Pavel
Agreed. But can't distro's give two SET's of RPMS:
1. kernel-xyz.rpm
2. kernel-xyz-debug.rpm
where both 1,2 are same kernels compiled w/ same config and with -g.
BUT rpm [1] is a 'strip -g' output of [2].
So people run [1] on their production systems. And developers analyze
core-dump from these systems using [2]. Can this be done and will it
work?
Thanks in advance,
Regards,
A.
ps: Please Cc: me the reply. I am not subscribed to the list.
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: compiling kernel with debug and optimization
[not found] ` <20030210192324.GA154@elf.ucw.cz.suse.lists.linux.kernel>
@ 2003-02-11 11:11 ` Andi Kleen
0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2003-02-11 11:11 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-kernel
Pavel Machek <pavel@ucw.cz> writes:
> Hi!
>
> > Does compiling with -g option degrade performance? IMO it should NOT.
> >
> > If that's true, then why dont we compile kernels with both -g and -O2
> > always?
>
> Build with -g takes *a lot* of diskspace, like 1Gig.
With gcc 3.x and its dwarf2 default.
It's a lot smaller when you compile with -gstabs (on i386)
stabs works as well for 32bit, but is much more compact.
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-02-12 5:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-10 11:11 compiling kernel with debug and optimization devnetfs
2003-02-10 11:32 ` Keith Owens
2003-02-10 16:28 ` devnetfs
2003-02-10 19:23 ` Pavel Machek
2003-02-12 5:20 ` devnetfs
[not found] <20030210111151.31800.qmail@web20418.mail.yahoo.com.suse.lists.linux.kernel>
[not found] ` <20030210192324.GA154@elf.ucw.cz.suse.lists.linux.kernel>
2003-02-11 11:11 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).