tools/perf/python/treport.py | 561 +++++++++++++++++++++++++++++++++++ 1 file changed, 561 insertions(+) create mode 100755 tools/perf/python/treport.py
Implement a perf TUI using the python textual module. Using the
textual framework means that in most modern terminals the mouse is
supported, the color scheme can be configured, and screenshots made.
The work is dependent on the extensions to the perf python module
merged into perf-tools-next such as commit 88439191ad5e ("perf python:
Add callchain support"). It is also dependent on the python textual
module for TUI support.
v4: Fix typo of profle to profile and tweak argparse command
description to only mention flamegraph after that support is added
(Sashiko). Sashiko notes a high severity issue because the script
depends on perf Python module extensions that are already
merged. This is because Sashiko is testing the changes against the
perf-tools rather than perf-tools-next. Verified
rich.errors.MarkupError don't occur for kernel DSOs, primarily as
there is always a space after the square brackets.
v3: Tweaks to commit messages (Sashiko).
https://lore.kernel.org/linux-perf-users/20260809041638.2402705-1-irogers@google.com/
v2: Migrate from inbuilt perf python interpreter to perf python
module. Improve the flamegraph performance. Use the textual's
color scheme rather than red and white.
https://lore.kernel.org/linux-perf-users/20260808065743.2328212-1-irogers@google.com/
v1:
https://lore.kernel.org/linux-perf-users/20250725082425.20999-1-irogers@google.com/
Alice Rogers (2):
perf python: New treport script
perf python: treport add flamegraph support
tools/perf/python/treport.py | 561 +++++++++++++++++++++++++++++++++++
1 file changed, 561 insertions(+)
create mode 100755 tools/perf/python/treport.py
--
2.55.0.654.g21b8a5bc05-goog
On Sat, Aug 08, 2026 at 10:18:17PM -0700, Ian Rogers wrote:
> Implement a perf TUI using the python textual module. Using the
> textual framework means that in most modern terminals the mouse is
> supported, the color scheme can be configured, and screenshots made.
>
> The work is dependent on the extensions to the perf python module
> merged into perf-tools-next such as commit 88439191ad5e ("perf python:
> Add callchain support"). It is also dependent on the python textual
> module for TUI support.
Cool stuff, just tested it :-)
Thanks, applied to perf-tools-next, for v7.4.
- Arnaldo
> v4: Fix typo of profle to profile and tweak argparse command
> description to only mention flamegraph after that support is added
> (Sashiko). Sashiko notes a high severity issue because the script
> depends on perf Python module extensions that are already
> merged. This is because Sashiko is testing the changes against the
> perf-tools rather than perf-tools-next. Verified
> rich.errors.MarkupError don't occur for kernel DSOs, primarily as
> there is always a space after the square brackets.
>
> v3: Tweaks to commit messages (Sashiko).
> https://lore.kernel.org/linux-perf-users/20260809041638.2402705-1-irogers@google.com/
>
> v2: Migrate from inbuilt perf python interpreter to perf python
> module. Improve the flamegraph performance. Use the textual's
> color scheme rather than red and white.
> https://lore.kernel.org/linux-perf-users/20260808065743.2328212-1-irogers@google.com/
>
> v1:
> https://lore.kernel.org/linux-perf-users/20250725082425.20999-1-irogers@google.com/
>
> Alice Rogers (2):
> perf python: New treport script
> perf python: treport add flamegraph support
>
> tools/perf/python/treport.py | 561 +++++++++++++++++++++++++++++++++++
> 1 file changed, 561 insertions(+)
> create mode 100755 tools/perf/python/treport.py
>
> --
> 2.55.0.654.g21b8a5bc05-goog
© 2016 - 2026 Red Hat, Inc.