mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
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> |
||
|---|---|---|
| .. | ||
| counting.py | ||
| event_analyzing_sample.py | ||
| failed-syscalls-by-pid.py | ||
| failed-syscalls.py | ||
| flamegraph.py | ||
| futex-contention.py | ||
| gecko.py | ||
| ilist.py | ||
| mem-phys-addr.py | ||
| perf_live.py | ||
| perf.pyi | ||
| rw-by-file.py | ||
| rw-by-pid.py | ||
| rwtop.py | ||
| sched-migration.py | ||
| SchedGui.py | ||
| sctop.py | ||
| stackcollapse.py | ||
| stat-cpi.py | ||
| syscall-counts-by-pid.py | ||
| syscall-counts.py | ||
| task-analyzer.py | ||
| tracepoint.py | ||
| treport.py | ||
| twatch.py | ||
| wakeup-latency.py | ||