diff options
| author | Ian Rogers <irogers@google.com> | 2026-09-25 23:19:53 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-26 20:49:29 +0200 |
| commit | b83f0bacf5e4f9369257f5c1191df02ab1be5602 (patch) | |
| tree | 6d558cf3c5ae65ce9904412a3e77067ce7ae6068 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 4e3fe6987cbad8ab1c97815f4f27b2417d303233 (diff) | |
| download | linux-next-b83f0bacf5e4f9369257f5c1191df02ab1be5602.tar.gz linux-next-b83f0bacf5e4f9369257f5c1191df02ab1be5602.zip | |
perf python: Port sctop to perf module
Port sctop.py from tools/perf/scripts/python/ to a standalone script in
tools/perf/python/ using an SCTopAnalyzer class structure.
Improvements compared to the legacy script:
- Support both offline perf.data analysis (via perf.session, advancing
display intervals deterministically using event timestamps) and live
monitoring (via LiveSession with automatic tracepoint fallback from
raw_syscalls:sys_enter to syscalls:sys_enter_*).
- Resolve architecture-aware syscall names via
perf.syscall_name(id, session.e_machine) without requiring
python-audit.
- Replace unsafe signal.SIGALRM dictionary mutation and os.popen("clear")
subshell spawning with a synchronized threading.Lock / threading.Event
timer and direct ANSI terminal escape sequences ('\x1b[2J\x1b[H').
Add a shell test (test_sctop_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>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
