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.

Atom Feed for Comments 2 Responses to “mddepend.pl stats”

  1. darin Says:

    Are the redundant stats actually expensive? Won’t they just hit the disk buffers?

  2. Shawn Wilsher Says:

    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?

Leave a Reply