From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Thomas Falcon <thomas.falcon@intel.com>,
Alice Rogers <alice.mei.rogers@gmail.com>,
Changbin Du <changbin.du@huawei.com>,
Tengda Wu <wutengda@huaweicloud.com>, tanze <tanze@kylinos.cn>,
Athira Rajeev <atrajeev@linux.ibm.com>,
Dapeng Mi <dapeng1.mi@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1 00/13] perf timechart/list/treport: Interactive Textual TUIs and perf python session improvements
Date: Sat, 3 Oct 2026 11:10:07 +0200 [thread overview]
Message-ID: <asDGb6qOgJzXDpNo@x2> (raw)
In-Reply-To: <20261002182624.3259797-1-irogers@google.com>
On Fri, Oct 02, 2026 at 11:26:09AM -0700, Ian Rogers wrote:
> This series adds interactive terminal user interfaces (TUIs) built with
> Python's textual framework for 'perf timechart' (--tui and --live) and
> 'perf list' (--tui), updates 'treport' to progressively display profiles
> while loading in the background, adds headless shell tests for all three
> TUIs, and improves the 'perf' Python extension module to support
> responsive background and live pipe event processing:
>
> 1. Session and Python extension improvements (patches 1-5):
> - Skip flushing remaining deferred samples and auxtrace events once
> session_done() is set so stopping event processing is immediate.
> - Quietly stop processing events when a Python session callback raises
> an exception (e.g., to cancel a background load on quit) without
> corrupting TUI output with reader error messages.
> - Lazily copy perf_event and perf_sample in process_events() only when
> a Python callback retains a reference beyond its return, shrinking
> struct pyrf_event to fit in CPython's small-object allocator.
> - Lazily unwind and resolve sample callchains only when
> event.callchain is accessed.
> - Release the Python GIL around perf_session__new() and
> perf_session__process_events() (reacquiring it in callbacks and
> guarding concurrent thread/comm/symbol access) so blocking pipe
> reads do not freeze TUI threads.
Nice optimizations, applied and tested by running some of the live
python scripts (twatch, ilist, etc)
> 2. 'perf list --tui' and ilist test (patches 6-7):
> - Add 'perf list --tui' to launch the interactive ilist script via
> 'perf script', and add a shell test driving ilist headlessly.
Applied and tested
> 3. Progressive loading in treport and test (patches 8-9):
> - Load profiles in a background thread in treport.py so the report
> tree and flame graph are interactive while loading, with lazy tree
> node creation and a headless shell test.
Ditto
> 4. 'perf timechart --tui' and '--live' and tests (patches 10-13):
> - Add ttimechart.py and 'perf timechart --tui' to interactively view,
> zoom, and pan per-CPU (busy, frequency, idle), per-task (running,
> runnable, blocked, wakeups), and I/O timelines along with a summary
> table.
> - Add 'perf timechart --live' to stream live scheduler, power, or I/O
> events from a 'perf record' subprocess over a pipe with a rolling
> time window, pause/resume via the control pipe, and optional output
> recording (-o).
> - Add headless shell tests covering both '--tui' and '--live' modes.
Applied up to patch 11, 12 has an issue, you can resubmit once
addressing the issue.
Thanks,
- Arnaldo
> Alice Rogers (6):
> perf treport: Show the profile while it loads
> perf test: Add a test for the treport script
> perf timechart: Add an interactive --tui mode
> perf test: Add a test for perf timechart --tui
> perf timechart: Add a --live mode to the TUI
> perf test: Test perf timechart --live
>
> Ian Rogers (7):
> perf session: Don't flush remaining events once processing is done
> perf python: Quietly stop processing events when a callback raises
> perf python: Lazily copy events and samples from process_events
> perf python: Lazily resolve sample callchains
> perf python: Release the GIL while processing session events
> perf list: Add a --tui option to launch ilist
> perf test: Add a test for the ilist script
>
> tools/perf/Documentation/perf-list.txt | 10 +
> tools/perf/Documentation/perf-timechart.txt | 24 +
> tools/perf/builtin-list.c | 34 +
> tools/perf/builtin-timechart.c | 114 +-
> tools/perf/python/treport.py | 458 ++-
> tools/perf/python/ttimechart.py | 2467 +++++++++++++++++
> tools/perf/tests/shell/test_ilist_python.sh | 181 ++
> tools/perf/tests/shell/test_treport_python.sh | 247 ++
> .../tests/shell/test_ttimechart_python.sh | 537 ++++
> tools/perf/util/auxtrace.c | 7 +
> tools/perf/util/python.c | 1191 +++++---
> tools/perf/util/session.c | 8 +
> 12 files changed, 4754 insertions(+), 524 deletions(-)
> create mode 100755 tools/perf/python/ttimechart.py
> create mode 100755 tools/perf/tests/shell/test_ilist_python.sh
> create mode 100755 tools/perf/tests/shell/test_treport_python.sh
> create mode 100755 tools/perf/tests/shell/test_ttimechart_python.sh
>
> --
> 2.56.0.rc1.315.gc6ed9934b7-goog
next prev parent reply other threads:[~2026-10-03 9:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 18:26 Ian Rogers
2026-10-02 18:26 ` [PATCH v1 01/13] perf session: Don't flush remaining events once processing is done Ian Rogers
2026-10-02 18:26 ` [PATCH v1 02/13] perf python: Quietly stop processing events when a callback raises Ian Rogers
2026-10-02 18:26 ` [PATCH v1 03/13] perf python: Lazily copy events and samples from process_events Ian Rogers
2026-10-02 18:26 ` [PATCH v1 04/13] perf python: Lazily resolve sample callchains Ian Rogers
2026-10-02 18:26 ` [PATCH v1 05/13] perf python: Release the GIL while processing session events Ian Rogers
2026-10-02 18:26 ` [PATCH v1 06/13] perf list: Add a --tui option to launch ilist Ian Rogers
2026-10-02 18:26 ` [PATCH v1 07/13] perf test: Add a test for the ilist script Ian Rogers
2026-10-02 18:26 ` [PATCH v1 08/13] perf treport: Show the profile while it loads Ian Rogers
2026-10-03 9:31 ` Arnaldo Carvalho de Melo
2026-10-02 18:26 ` [PATCH v1 09/13] perf test: Add a test for the treport script Ian Rogers
2026-10-03 9:35 ` Arnaldo Carvalho de Melo
2026-10-02 18:26 ` [PATCH v1 10/13] perf timechart: Add an interactive --tui mode Ian Rogers
2026-10-02 18:26 ` [PATCH v1 11/13] perf test: Add a test for perf timechart --tui Ian Rogers
2026-10-02 18:26 ` [PATCH v1 12/13] perf timechart: Add a --live mode to the TUI Ian Rogers
2026-10-02 18:26 ` [PATCH v1 13/13] perf test: Test perf timechart --live Ian Rogers
2026-10-03 9:10 ` Arnaldo Carvalho de Melo [this message]
2026-10-03 9:12 ` [PATCH v1 00/13] perf timechart/list/treport: Interactive Textual TUIs and perf python session improvements Arnaldo Carvalho de Melo
2026-10-03 9:15 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=asDGb6qOgJzXDpNo@x2 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alice.mei.rogers@gmail.com \
--cc=atrajeev@linux.ibm.com \
--cc=changbin.du@huawei.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tanze@kylinos.cn \
--cc=thomas.falcon@intel.com \
--cc=wutengda@huaweicloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®