summaryrefslogtreecommitdiff
path: root/tools/perf/python/parallel-perf.py
AgeCommit message (Collapse)Author
13 daysperf python: Move and clean up parallel-perf.pyIan Rogers
Move parallel-perf.py from tools/perf/scripts/python/ to tools/perf/python/ as it is a standalone Python utility that invokes 'perf script' in parallel across time slices and CPUs. Update tools/perf/tests/shell/script.sh accordingly. Also fix bugs and clean up the script to pass mypy and pylint without suppression comments: - Fix Work.command() to return the shlex.quote()-escaped command string (previously sh_cmd was computed with shlex.quote() and discarded in favor of unquoted self.cmd). - Close self.popen.stdout in the parent process after spawning the consumer subprocess in Work.start() when --pipe-to is used, ensuring the producer receives SIGPIPE if the consumer exits early and avoiding leaking the pipe file descriptor. - Convert method and function names to snake_case, specify utf-8 file encodings, and add type annotations and docstrings. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>