diff options
| author | Ian Rogers <[email protected]> | 2025-05-19 22:46:43 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2025-05-21 18:07:13 +0000 |
| commit | ab2c742d75ac2f52f0172907bfbc898475f75273 (patch) | |
| tree | edf7d46c2a263b2321faf538e6ef81823d54dfe9 /tools/perf/python/counting.py | |
| parent | perf ftrace: Use process/session specific trace settings (diff) | |
| download | kernel-ab2c742d75ac2f52f0172907bfbc898475f75273.tar.gz kernel-ab2c742d75ac2f52f0172907bfbc898475f75273.zip | |
perf dso: Minor refactor to allow clang's Wthread-safety analysis
The pattern:
```
if (x) {
lock(...)
}
block1;
if (x) {
unlock(...)
}
```
defeats clang's -Wthread-safety analysis where it complains of locks
held on one path and not another.
Add helper functions for "block1" then restructure as:
```
if (x) {
lock(...);
block1();
unlock(...);
} else {
block1();
}
```
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Bill Wendling <[email protected]>
Cc: Chaitanya S Prakash <[email protected]>
Cc: Fei Lang <[email protected]>
Cc: Howard Chu <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Justin Stitt <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephen Brennan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/python/counting.py')
0 files changed, 0 insertions, 0 deletions
