|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-11-11 21:06:21
on Sat Nov 10 2007, "K. Noel Belcourt" <kbelco-AT-sandia.gov> wrote:
> On Nov 10, 2007, at 11:52 AM, Vladimir Prus wrote:
>
>> David Abrahams wrote:
>>
>>>
>>> Did we ever put code in bjam that will allow us to get timing
>>> information for individual build steps?
>>
>> I think you tried to do that, but I'm not sure it was ever finished.
>>
>>> I realize we are getting
>>> timestamps, but that doesn't quite amount to the same thing,
>>> especially because we get a stamp for the beginning of a test run but
>>> not the end, but also because we really want to know the user and/or
>>> system time rather than real time, which can be grossly distorted by
>>> other activity on the machine.
>>
>> The user and/or system time can be likewise distorted by other
>> activity -- in
>> particular the number of cache faults is dependent on what other
>> application
>> are busy thrashing the cache.
>
> We could add the ability to time all child processes to bjam, since
> that would give us the most reliable numbers (using a call to
> getrusage when the child process terminates). It might take a bit of
> effort but I'd be willing to do it (it would have significant value
> to our organization as well). We'd need to get Rene's help to (1)
> decide if it could be handled efficiently in Windows (2) whether /
> when he might have the time to do it.
I already implemented that for windows; at least it works there. My
implementation for *nix didn't use getrusage. I was using times().
Maybe that was my problem...
I would very much appreciate it if you could do the *nix
implementation. Please search the bjam code for "timing_info" to see
what to change. I think it's all in execunix.c
Cheers,
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk