diff options
| author | Namhyung Kim <[email protected]> | 2021-02-02 18:01:18 +0900 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-02-03 13:10:44 -0300 |
| commit | 473f742e1845d83dbbd1a32e3881c3d36ae99ea1 (patch) | |
| tree | 85712cf17395bbddd9af2c9c2586e2a0a9b9de52 /tools/perf/scripts/python/bin | |
| parent | c1b907953b2cd9ff130594e58c9114019926a217 (diff) | |
perf tools: Use scandir() to iterate threads when synthesizing PERF_RECORD_ events
Like in __event__synthesize_thread(), I think it's better to use
scandir() instead of the readdir() loop. In case some malicious task
continues to create new threads, the readdir() loop will run over and
over to collect tids. The scandir() also has the problem but the window
is much smaller since it doesn't do much work during the iteration.
Also add filter_task() function as we only care the tasks.
Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions