[PATCH v3 0/2] perf timechart: Add --live mode to the TUI and test
From: Ian Rogers
Date: Fri Oct 23 2026 - 00:18:38 EST
Add a '--live' option to 'perf timechart' and 'ttimechart.py' that streams
live scheduler, power, or I/O (-I/--io-only) events from a 'perf record'
subprocess over a pipe and displays them in the Textual TUI with a rolling
time window (--window, default 10s), pause/resume via the control pipe, an
optional workload after '--', and optional output recording (-o), along
with headless shell tests in test_ttimechart_python.sh.
v3: Address Sashiko review feedback:
- Patch 1: Explicitly include <string.h> in builtin-timechart.c.
- Patch 1: Reject non-finite --window values (e.g. 'inf') that
overflowed converting to nanoseconds.
- Patch 2: Stop the fake recorder in a try/finally in the synthetic
live UI test so a failed check can't leave its background thread
running and hang the test.
Rebase onto the latest perf-tools-next.
v2: https://lore.kernel.org/linux-perf-users/20261014042249.2379829-1-irogers@xxxxxxxxxx/
v2: Rebase the remaining 2 patches onto perf-tools-next after patches 1-11
of v1 were merged.
Alice Rogers (2):
perf timechart: Add a --live mode to the TUI
perf test: Test perf timechart --live
tools/perf/Documentation/perf-timechart.txt | 20 +-
tools/perf/builtin-timechart.c | 81 +-
tools/perf/python/ttimechart.py | 786 ++++++++++++++++--
.../tests/shell/test_ttimechart_python.sh | 303 +++++++
4 files changed, 1115 insertions(+), 75 deletions(-)
--
2.56.0.307.g5fe7bd680c-goog