make-alpha
[Top][All Lists]
Advanced

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

Re: secondary expansion changes


From: Paul Smith
Subject: Re: secondary expansion changes
Date: Fri, 25 Sep 2009 13:12:51 -0400

On Fri, 2009-09-25 at 18:35 +0200, Boris Kolpackov wrote:
> Good question. I know that there are about 7K pattern variables
> and about 900 pattern rules. There are quite a few files involved,
> but I wouldn't say more than a thousand or two. None of that really
> explains the turnover or 45M of reachable memory at the end.

The turnover might imply we need some more static buffers; I've created
a few more in my last commit but there are still lots of allocs.  make
isn't multithreaded so we don't have to worry about that but it is
highly recursive, so we have to be careful in that respect.

> [BTW, the reason there are 7K pattern variables is because every
>  definition is added to the list. For example, if I have:
> 
>  %.o: CFLAGS := -g
>  %.o: CFLAGS := -g
>  %.o: CFLAGS := -g
> 
>  All three assignments will end up in the list. I wonder if we can
>  be smarter here?]

Do you mean there are three instances of the "%.o" pattern rule?  It
must be that because we can't have three instances of the same variable
in a single pattern.

Sure, we can fix this, at a bit of performance cost (well, "a bit"
depends on how many pattern-specific variables you have).  We have to
preserve the order because, just like pattern rules, they are searched
in order.  Either we could just linearly search them to see if we
already have one, or we could create a look-aside hash for them if a
linear search was too slow.

> > What would be really nice is if you could run with --leak-check=full and
> > send me the stack traces for the leaks.  Then I could see if they were
> > the same ones I'm seeing when I run the regression tests.
> 
> Here is the log. I also added --show-reachable=yes:
> 
> http://www.codesynthesis.com/~boris/tmp/make-valgrind.log

Oops:

        You don't have permission to
        access /~boris/tmp/make-valgrind.log on this server.

> > But, instructions on how to build your environment are welcome as well;
> > it seems like a worthy test case to be added to my environment.
> 
> Ok, I will work on this. Which GNU/Linux distribution are you using?

I have both Ubuntu and Red Hat.  I'm pretty good at working out the
details, though :-)





reply via email to

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