linux/tools/perf/python
Ian Rogers 47b00c3878 perf python: Port rw-by-file from Perl to perf module
Replace the legacy Perl script rw-by-file.pl with a standalone Python
script in tools/perf/python/rw-by-file.py using the perf Python module.

Improvements compared to the legacy Perl script:
- Remove the dependency on libperl and Perf::Trace::Util.
- Encapsulate per-file-descriptor read/write byte and call count
  aggregation in an RwByFile class using perf.session and resolve thread
  command names via session.find_thread(pid, sample_tid).
- Add argparse CLI support (-i/--input and target program filter) and
  full type annotations.

Add a shell test
(test_rw_by_file_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>
2026-09-26 20:49:29 +02:00
..
counting.py perf python: Improve perf script -l descriptions 2026-09-26 20:49:27 +02:00
event_analyzing_sample.py perf python: Port event_analyzing_sample to perf module 2026-09-26 20:49:29 +02:00
failed-syscalls-by-pid.py perf python: Port failed-syscalls-by-pid to perf module 2026-09-26 20:49:29 +02:00
failed-syscalls.py perf python: Port failed-syscalls from Perl to perf module 2026-09-26 20:49:29 +02:00
flamegraph.py perf python: Port flamegraph to perf module 2026-09-26 20:49:28 +02:00
gecko.py perf python: Port gecko to perf module 2026-09-26 20:49:28 +02:00
ilist.py perf python: Clean up pylint warnings in ilist.py 2026-09-26 20:49:27 +02:00
mem-phys-addr.py perf python: Port mem-phys-addr to perf module 2026-09-26 20:49:28 +02:00
perf_live.py perf python: Allow KeyboardInterrupt to propagate in LiveSession 2026-09-26 20:49:27 +02:00
perf.pyi perf python: Add Intel PT call_return and itrace capability 2026-09-26 20:49:27 +02:00
rw-by-file.py perf python: Port rw-by-file from Perl to perf module 2026-09-26 20:49:29 +02:00
sctop.py perf python: Port sctop to perf module 2026-09-26 20:49:29 +02:00
stackcollapse.py perf python: Port stackcollapse to perf module 2026-09-26 20:49:28 +02:00
stat-cpi.py perf python: Port stat-cpi to perf module 2026-09-26 20:49:28 +02:00
syscall-counts-by-pid.py perf python: Port syscall-counts-by-pid to perf module 2026-09-26 20:49:29 +02:00
syscall-counts.py perf python: Port syscall-counts to perf module 2026-09-26 20:49:29 +02:00
tracepoint.py perf python: Improve perf script -l descriptions 2026-09-26 20:49:27 +02:00
treport.py perf python: Clean up pylint warnings in treport.py 2026-09-26 20:49:27 +02:00
twatch.py perf python: Improve perf script -l descriptions 2026-09-26 20:49:27 +02:00