mddepend.pl stats
My last post mentioned that mddepend.pl causes our build system to do many extra calls to stat(). I’ve done some instrumentation and come up with the following numbers (Linux, Firefox trunk):
Calls to mddepend.pl | mddepend calls to stat()
| |
---|---|---|
New objdir | 336 | 65832 |
Nothing-changed rebuild | 1148 | 224536 |
When building from scratch, there isn’t any need to call mddepend.pl: all the invocations and stat()
s performed are unnecessary overhead. When doing a rebuild, some portion of the stats performed are necessary/expected, but nowhere near as many as are actually performed. I expect a full two-thirds of the calls to mddepend.pl are unnecesary, and probably 90% of the calls to stat(). The 224k stats in the depend build checked 16599 unique files, which means that a good stat cache reduces the size of the problem significantly.
November 27th, 2006 at 6:05 pm
Are the redundant stats actually expensive? Won’t they just hit the disk buffers?
November 27th, 2006 at 7:58 pm
So, is there a bug filed on this? I’d like to cc myself on it to track progress.
How much do you think this might speed up the build process?