diff options
| author | Ian Rogers <irogers@google.com> | 2026-09-25 23:20:00 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-26 20:49:30 +0200 |
| commit | 97c70711fc5b7446e66340dcf8b40dd31c27b5d3 (patch) | |
| tree | 4fc4bc12bcc6ac8a10b65c1c6a558eb7e863d351 /tools/perf/scripts/python/task-analyzer.py | |
| parent | 56d9f05dce1dd091c0ca2683aaa2d70fdc1884a3 (diff) | |
| download | linux-next-97c70711fc5b7446e66340dcf8b40dd31c27b5d3.tar.gz linux-next-97c70711fc5b7446e66340dcf8b40dd31c27b5d3.zip | |
perf python: Port wakeup-latency from Perl to perf module
Replace the legacy Perl script wakeup-latency.pl with a standalone
Python script in tools/perf/python/wakeup-latency.py using the perf
Python module.
Improvements compared to the legacy Perl script:
- Remove the dependency on libperl and Perf::Trace::Util.
- Track wakeup timestamps per-task (keyed by the wakee PID on
sched:sched_wakeup and matched against next_pid on sched:sched_switch)
rather than per-CPU, avoiding mixed latencies when multiple wakeups
occur on a CPU before a context switch.
- Guard print_totals() when total_wakeups == 0 (printing 'N/A' instead
of dividing by zero when a trace contains no matched wakeup/switch
pairs).
- Add argparse CLI options (-i/--input) and full type annotations.
Add a shell test
(test_wakeup_latency_python.sh) to verify the standalone script.
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>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
