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

Improvements compared to the legacy script:
- Remove the dependency on PySide/QtSql by using Python's built-in
  sqlite3 module in DatabaseExporter, allowing SQLite export on headless
  and minimal systems without Qt installed.
- Support Intel PT and hardware instruction trace export via
  perf.session(itrace=...) and perf.call_return callbacks, reconstructing
  relational call_paths and calls tables and decoding synthesized PT
  payloads (ptwrite, cbr, mwait, pwre, exstop, pwrx).
- Export context_switches via perf.session's context_switch callback
  and map thread and comm IDs to their relational database keys.
- Manage temporary staging files inside an isolated tempfile.mkdtemp()
  directory with guaranteed cleanup in a finally block.

Update Documentation/db-export.txt and add a shell test
(test_export_to_sqlite_python.sh) to verify the standalone exporter.

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>
