diff options
| author | Ian Rogers <irogers@google.com> | 2026-09-25 23:20:09 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-26 20:49:31 +0200 |
| commit | 62d350135e676a11775bf7b85f1ed75a476d811c (patch) | |
| tree | 0d438fca3bae312c69248c11094ac57e87f55297 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 915d6b14dc0c8971ce33f27c527d21e1ea63d906 (diff) | |
| download | linux-next-62d350135e676a11775bf7b85f1ed75a476d811c.tar.gz linux-next-62d350135e676a11775bf7b85f1ed75a476d811c.zip | |
perf python: Port export-to-sqlite to perf module
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 <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
