summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2014-04-15 19:28:38 +0000
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2014-04-17 16:23:08 -0700
commit2ca88ad6d52a8a4882eb8e8b5c532a56813a6eb4 (patch)
treeb4a4438e8de88123ba65bd951dc472cd23e06a05 /lib
parent7269e5dc8cff1e29af8af64475ceda50887c2865 (diff)
backports: Use Coccinelle --relax-include-path
This will provide wider coverage on include paths for our Coccinelle rule interpretation, at a very lower cost incurred, about 1 second, for code generation. Coccinelle makes an effort to infer types but with a wider coverage of header files it can do a better job at that. You want to use both --recursive-includes (which we already enable) and --relax-include-path to get the most possible type information. You will want at least Coccinelle 1.0.0-rc20 which had an increase of performance of over 30% when using both --recursive-includes and --relax-include path. 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 1m15.370s user 10m47.232s sys 0m36.980s 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>
Diffstat (limited to 'lib')
-rw-r--r--lib/bpcoccinelle.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bpcoccinelle.py b/lib/bpcoccinelle.py
index bd276c73..75a0b37e 100644
--- a/lib/bpcoccinelle.py
+++ b/lib/bpcoccinelle.py
@@ -33,6 +33,7 @@ def spatch(cocci_file, outdir,
max_threads, thread_id, temp_dir, ret_q, extra_args=[]):
cmd = ['spatch', '--sp-file', cocci_file, '--in-place',
'--recursive-includes',
+ '--relax-include-path',
'--use-coccigrep',
'--backup-suffix', '.cocci_backup', '--dir', '.']