<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/tools/perf/python/rw-by-file.py, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/tools/perf/python/rw-by-file.py?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/tools/perf/python/rw-by-file.py?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-09-26T18:49:29Z</updated>
<entry>
<title>perf python: Port rw-by-file from Perl to perf module</title>
<updated>2026-09-26T18:49:29Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-09-26T06:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=47b00c38780d27bedb91b8090f74e0523ccbc95e'/>
<id>urn:sha1:47b00c38780d27bedb91b8090f74e0523ccbc95e</id>
<content type='text'>
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 &lt;irogers@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
