backports: use --use-coccigrep for Coccinelle
This uses --use-coccigrep on our Cocccinelle library and removes
the CPU adjustments depending on whether we are testing or not.
The flag --use-coccigrep will tell Coccinelle to only kick off a
worker on a file until it has determined that a rule being
evaluated applies to a file. This does however mean that all files
on its bucket list will be evaluated first, but this yields better
CPU usage without having us to ramp up on the number of threads
depending on the situation. Without this patch we were kicking off
more threads to account for the fact that a Coccinelle thread will
stop working on a file if it had little or nothing to do on a file.
Possible work improvement: see how we can do away with tmp files
for Coccinelle output and just use memory to for the ouput, or
perhaps even disregard the stdout and only care for it if
--debug-cocci is provided.
mcgrof@drvbp1 ~/backports (git::master)$ time ./gentree.py --clean
Copy original source files ...
Apply patches ...
Modify Kconfig tree ...
Rewrite Makefiles and Kconfig files ...
Cc: Peter Senna <firstname.lastname@example.org>
Cc: Julia Lawall <email@example.com>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>
Signed-off-by: Luis R. Rodriguez <firstname.lastname@example.org>
2 files changed