<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/tools/perf/python/compaction-times.py, branch linus/master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/tools/perf/python/compaction-times.py?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/tools/perf/python/compaction-times.py?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-09-26T18:49:30Z</updated>
<entry>
<title>perf python: Port compaction-times to perf module</title>
<updated>2026-09-26T18:49:30Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-09-26T06:20:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=45266bbeead70f2d4f02f5255ed4cb35fd74778a'/>
<id>urn:sha1:45266bbeead70f2d4f02f5255ed4cb35fd74778a</id>
<content type='text'>
Port compaction-times.py to a standalone script in tools/perf/python/
using the perf module directly to analyze mm_compaction tracepoints.

Improvements compared to the legacy script:
- Replace Python 2 constructs (such as sys.maxint and raw integer
  bitmasks) with Python 3 enum.IntEnum (Popt) and enum.IntFlag (Topt)
  types.
- Access tracepoint fields directly on perf.sample_event and add
  -i/--input CLI option support via argparse.
- Add full type annotations passing mypy and pylint without suppression
  comments.

Add a shell test (test_compaction_times_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>
