lkml.org 
[lkml]   [2000]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] kernel/module.c (plus gratuitous rant)
Linus Torvalds wrote:
>
> On Tue, 24 Oct 2000, Andrew Morton wrote:
> >
> > if the person who sent you the -pre4 patch against module.c
> > had Cc:'ed this mailing list then your kernel would do
> > something useful when compiled with gcc-2.7.2.3.
>
> It seems that gcc-2.7.2.3 is terminally ill. I'd rather change
> Documentation/Changes, and just document the fact.

That seems best.

> These kinds of subtle work-arounds for gcc bugs are not really acceptable,
> nor is it worthwhile complaining when somebody does development with a gcc
> that is _not_ broken, and doesn't notice that some random gcc bug breaks
> the kernel for others.

No, that would be an unreasonable complaint. My gripe is
unrelated to gcc - it concerns people who send you patches
and keep everyone else, including the nominal maintainer
in the dark.

I challenge anyone to demonstrate how the evasion of peer
review strengthens Linux.



Anyway, let's run the numbers on gcc:

gcc-2.7.2.3 versus
gcc-2.91.66 (egcs-1.1.2) versus
gcc-20001009 (three-week-old snapshot)

Compilation time (make -j3 bzImage, dual CPU)

gcc-2.7.2.3: 325.02s user 31.98s system 190% cpu 3:07.77 total
gcc-2.91.66: 356.51s user 30.96s system 195% cpu 3:17.71 total
gcc-20001009: 578.99s user 43.51s system 197% cpu 5:15.67 total

Memory footprint:

text data bss dec hex filename (Normalised)
gcc-2.7.2.3:
1383419 228621 247624 1859664 1c6050 vmlinux.2.7.2.3 1.00

gcc-2.91.66 (egcs-1.1.2)
1463242 239353 250004 1952599 1dcb57 vmlinux-2.91.66 1.05

gcc-20001009
1499994 244153 245620 1989767 1e5c87 vmlinux-20001009 1.07


A lot of this is due to more aggressive alignment in the two
newer compilers, so we add

-malign-loops=0 -malign-functions=0 -malign-jumps=0

and get:

gcc-2.91.66 (egcs-1.1.2) (-malign)
1429267 239353 250004 1918624 1d46a0 vmlinux-2.91.66-maligns 1.03

gcc-20001009 (-malign)
1422275 244153 245620 1912048 1d2cf0 vmlinux-20001009-maligns 1.03

but we note that the two more recent compilers still do
a `.align 32' in front of `.rodata/.string'. This is not
configurable on the gcc command line (it should be). Thank
heavens for the GPL:


1367864 238713 250004 1856581 1c5445 vmlinux-2.91.66-maligns-string 0.998

And replacing `-O2' with `-Os':

1358473 238713 250004 1847190 1c2f96 vmlinux 0.993


Summary? With `-malign-loops=0 -malign-functions=0 -malign-jumps=0 -Os'
and a little patch, egcs-1.1.2 actually generates shorter code than
2.7.2.3 and is not a significantly slower compiler.

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.088 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site