On 01.06.2016 22:36, Bryan Drewery wrote: >>> The graph in the original commit for WITH_FAST_DEPEND disagrees. >>> https://svnweb.freebsd.org/base?view=revision&revision=290433 >>> >>> We run the preprocessor once now, not twice. >> >> It sounds good, just implemented bad. You measure some spherical chicken >> in vacuum, not what really happens. In the old times I almost never have >> clang libs rebuild (few files from there max when FreeBSD_version is >> increased), but now I got them fully rebuilt with any header change. >> That is the biggest slowdown and not what you try to measure. >> Don't ever use 'make world'. Try to rebuild the system incrementally and >> you'll see. > > I cannot argue with a lack of solid evidence. > > The old 'make depend' ran 'mkdep' which ran 'cc -E -M' which produces > *the same output* as 'cc foo.c -o foo.o -MD -MF .depend.foo.o -MT > foo.o'. There's nothing different in the actual .depend file > implementation/content. Clang rebuilds often because it is changing > often! Just look at recent commit logs and you'll see r300984 which > will cause a rebuild of clang. Or r301011 which modified > sys/sys/param.h which will rebuild just about everything. These are > normal and how the old system worked as well. > > There certainly are some issues with the new system. > 1. Processing the split files can be slow over NFS > 2. make cleandepend - will cause the next build to make a lot of guesses > and not be very efficient. > 3. make cleandepend - There is no way to generate the .depend* files > again without rebuilding. > 4. It doesn't fix all of the missing dependencies that have been missing > forever such as crt, csu, libgcc, etc for static builds. > 5. the csu builds don't use it yet but have workarounds for it > 6. removing the 'make depend' tree-walk can hurt downstream builds which > relied on having a multi-phase build to generate a .mk file to include > (odd case I hit at work). No such case exists in the upstream FreeBSD tree. >
There are two different things: pure recursive dependency (it is how make depends works now) and just nested include graph with dependencies marked directly by Makefile's rules (it is how old system works). Now it is enough to touch some low level include to rebuild everything, before only files which include it directly or have make rules for it are rebuilt.
Description: OpenPGP digital signature