This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Flatten sysdeps/unix/bsd/bsd4.4 into sysdeps/unix/bsd


From: David Miller <davem@davemloft.net>
Date: Thu, 17 May 2012 19:37:49 -0400 (EDT)

> From: "Joseph S. Myers" <joseph@codesourcery.com>
> Date: Thu, 17 May 2012 23:26:37 +0000 (UTC)
> 
>> On Thu, 17 May 2012, David Miller wrote:
>> 
>>> Not to mention the well understood extreme computational complexity
>>> this scheme has in the context of make due to the amount of prefix
>>> rules that get made to support this.
>> 
>> I have the idea that you could reduce the number of rules rather a lot by 
>> arranging for sysd-rules to contain rules only where the sysdeps directory 
>> in question contains at least one file with the given suffix.  I don't 
>> know how much that would help (but, for example, rules using .s sources as 
>> opposed to .S are useless for every architecture other than alpha and 
>> hppa) or whether that reduction translates into less time spent in "make", 
>> but it seems at least plausible that it would give a useful build speedup 
>> until we have any more general solution.
> 
> That would eliminate around 1/4 of the prefix rules I believe.
> 
> Actually, my initial impression for this case is to simply rename the
> hppa/alpha foo.s files to foo.S and then remove the prefix rule case
> for .s entirely.

I was very curious how much this would help my build times on sparc.
So I tested changing "asm" to just ".S" instead of ".S .s" in the
sysd-rules target.

Before:

davem@nunsaram:~/src/GIT/GLIBC/build-sparcv9-multiarch$ time make -s -j128 >build.log 2>&1; echo $?

real    8m28.048s
user    92m39.820s
sys     7m34.810s

After:

davem@nunsaram:~/src/GIT/GLIBC/build-sparcv9-multiarch$ time make -s -j128 >build.log 2>&1; echo $?

real    7m35.993s
user    93m26.110s
sys     7m46.160s

Nearly a full minute.  And this is with a hacked GNU make that
attempts to mitigate a large amount of the prefix rule overhead.  For
those of you using standard GNU make binaries, the effect will be
even larger.

I guess the only saving grace for make taking up %60 of the glibc
build time is that it's good for tuning strcmp() et al. :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]