help-make
[Top][All Lists]
Advanced

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

Re: Profiling a "make" invocation


From: Paul Smith
Subject: Re: Profiling a "make" invocation
Date: Tue, 21 Jun 2011 11:48:18 -0400

On Tue, 2011-06-21 at 14:46 +0100, Mark Marshall wrote:
> I have a fairly large project that is built using make.  It takes a few 
> minutes to build, and I'm interested in where this time is going.  Is 
> there a standard way to profile a make run?
> 
> (For the avoidance of doubt, I'm not interested in profiling the actual 
> make executable, but rather the processes that it runs, 50% in gcc, 40% 
> in as, 10% in ld, etc...).

There's nothing like that available today.  However, you can do it
yourself pretty simply, I think.

For example if you make yourself a little shell script something like
this:

        #!/bin/sh
        time "$@"

(don't forget to make it executable!) then you set the make variable
SHELL to point to your script, it should show the time spent running
each invoked command.

(note, not tested!)




reply via email to

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