backports: revert unification of cocci files
This optimization was introduced by Johannes to help with
performance before we had parallelism. With parallelism
we get better results by splitting rules up. Also some
feedback from Julia on this:
===
I don't think this is a good idea. You would have to be careful about
naming. And You may lose on some performance benefits of the prefiltering.
Suppose you have an easy semantic patch that references function A and a
hard semantic patch that references function B. The hard semantic patch
specifically contains one rule that is very complicated but that does not
use B. That very complicated rule will now be applied to the 5000 files
that use A as well as to the 3 files that use B. So you get a big
performance slowdown.
===
The performance before this change:
mcgrof@drvbp1 ~/backports (git::master)$ time ./gentree.py --clean
--refresh \
/home/mcgrof/linux-next /home/mcgrof/build/next-
20140409
Copy original source files ...
Apply patches ...
Modify Kconfig tree ...
Rewrite Makefiles and Kconfig files ...
Done!
real 1m30.186s
user 9m25.180s
sys 0m24.428s
After:
mcgrof@drvbp1 ~/backports (git::master)$ time ./gentree.py --clean
/home/mcgrof/linux-next /home/mcgrof/build/next-
20140411
Copy original source files ...
Apply patches ...
Modify Kconfig tree ...
Rewrite Makefiles and Kconfig files ...
Done!
real 1m3.071s
user 3m39.388s
sys 0m21.812s
commit
3c71184d3a2843c9a1d5a289c71bfbbc126d71fd
Author: Johannes Berg <johannes.berg@intel.com>
Date: Wed Jan 1 20:37:13 2014 +0100
gentree: combine spatches (unless using --gitdebug)
Since spatch is rather slow, but can handle multiple spatches
concatenated in a single file, just do that and run it only
once rather than for each spatch. That shaves off some of the
runtime (startup etc. and finding affected files.)
On my system, I go from
real 9m42.616s
user 8m48.352s
sys 0m22.884s
to
real 9m1.948s
user 8m40.108s
sys 0m12.088s
Cc: Peter Senna <peter.senna@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>