diff options
| author | Sang-Heon Jeon <ekffu200098@gmail.com> | 2026-07-27 22:52:44 +0900 |
|---|---|---|
| committer | Julia Lawall <Julia.Lawall@inria.fr> | 2026-08-23 22:12:10 +0200 |
| commit | a53cbd149844cbde80f6adfc7f4233b8f230f664 (patch) | |
| tree | 3afbe34474251cb8de55173f0d5d34db40fd9935 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | b64acacd5429ff3fe7c38cb3cf959bbd3a9fb30f (diff) | |
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>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
