automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using -MMD instead of -MD for depndency generation


From: Ralf Wildenhues
Subject: Re: Using -MMD instead of -MD for depndency generation
Date: Wed, 27 Oct 2010 20:51:14 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Holger,

* Holger Freyther wrote on Mon, Oct 25, 2010 at 09:39:29AM CEST:
> On 10/25/2010 08:09 AM, Ralf Wildenhues wrote:
> > * Holger Freyther wrote on Sat, Oct 23, 2010 at 10:47:47PM CEST:
> >> when typing make in the build directory of WebKit/GTK+ it takes multiple
> >> minutes until the first file is compiled.
> > 
> > Can you go into (a lot) more detail here?  What happens during those
> > minutes, which processes are running (look at ps output etc.)?
> 
> I am talking about executing make after the source has been built once. E.g.
> there is only one file changed and I want to rebuild the library with this
> single new file. My benchmark is to type 'time make' on unchanged source. From
> my expectation it will parse the GNUmakefile and all the files (the .Plo, Po
> with the dependencies) included by it, then it needs to verify the
> dependencies of all these rules for the 'all' target and then exits. Right now
> this takes 5:42m usertime (+- 10 seconds).

OK.  That's a lot.  My half-stable-half-testing system needs some love
to build webkit OOTB so I can't provide comparison data yet.

> > Is this
> > cold-cache or hot-cache?  Only the first time the code is compiled, or
> > the build tree is used, i.e., does it happen again after 'make clean'?
> > Or are you talking about configure (-q?) run time here?
> 
> My system is a MSI X340 with a U7300  @ 1.30GHz and had about 2GB of RAM
> available, it is running 2.6.36rc8 (but all kernels have shown this behavior)
> on a Fedora F14 installation. GNU make is of version 3.82, automake is 1.11.1.
> This is with a 'hot-cache' but with only 2GB of RAM not every file will fit
> into the page cache. The disk speed is quite okay, slowed down a bit due 
> dm-crypt.
> 
> The system is not loaded at all, it runs a wm, some gnome-terminals with
> remote ssh sessions, when executing make it will be the process that takes 99%
> of the CPU.

Have you tried moving the build tree to a ramdisk (/dev/shm)?
Do you use the noatime or relatime mount option?  If not, please
seriously consider doing so on mount points where you keep temporary
data (not your mail folders!).

For most effective edit-compile-test cycle, I typically move to a big
system with lots of RAM and use make -jN with the build tree (not
necessarily the source tree) on ramdisk and optionally also use ccache
and/or distcc (if the system is not that big).  I've found the ramdisk
to make file system accesses fairly irrelevant.

Eventually, the right answer to lots of file accesses for builds this
size or larger is to use a beta build system.  I hope somebody ports
tup to GNU make syntax, or extends GNU make to have tup-like
functionality.

If the above all doesn't help make your problem irrelevant, I might be
willing to look into optionally going for -MMD instead of -MD, but I do
think that from a correctness POV it is not the right thing.  If your
installed software changed, then you need to also rebuild.

Cheers,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]