Files
linux/scripts
Sang-Heon Jeon a53cbd1498 coccinelle: mini_lock: improve performance when searching loops
The 'looped' rule collects the returns inside a for loop to
prevent 'err' from reporting them. It searches every for loop in
the file, and on files with large loop bodies the search explodes.

For example, kernel/bpf/verifier.c runs for over 200 seconds,
almost entirely in 'looped' according to --profile. Since the
kernel .cocciconfig sets a 200 second timeout, coccicheck silently
skips the file.

To avoid this, collect the candidate returns first, so that
'looped' checks only those positions. 'err' then excludes what
'looped' found.

Every return that 'err' can report is also a candidate, so the
same returns are excluded as before and the output does not change.
A report-mode run over every .c file in the tree produces identical
output.

So verifier.c now finishes well within the timeout, in a few
seconds.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
2026-08-23 22:12:10 +02:00
..
2024-10-07 02:12:27 +09:00
2024-11-28 08:11:56 +09:00
2026-01-11 06:09:11 -10:00
2026-07-27 17:18:00 +02:00