Re: [PATCH v4 00/49] perf: Complete transition to standalone Python scripts

From: Ian Rogers

Date: Sat Sep 26 2026 - 18:46:49 EST


On Sat, Sep 26, 2026 at 1:41 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> On Fri, Sep 25, 2026 at 11:19:27PM -0700, Ian Rogers wrote:
> > The perf script command has historically supported running Python and Perl
> > scripts by embedding libpython and libperl. That approach has several
> > drawbacks:
> > - high overhead from constructing Python dictionaries for every event
> > (whether used by the script or not),
> > - complex build dependencies on specific Python/Perl libraries,
> > - threading and interpreter lifecycle complications from embedding the
> > interpreter inside perf,
> > - no unified model for standalone scripts such as ilist.py, treport.py,
> > tracepoint.py, and twatch.py.
>
> So I applied it and tested on the containers, make -C tools/perf
> build-test and 'perf test', that has some flakiness running the new
> tests for these python scripts in parallel, nothing that prevents it
> from being merged now tho:
>
> === Test Summary ===
> Passed main tests : 146
> Passed subtests : 156
> Skipped tests : 28
> Failed tests : 13
> List of failed tests:
> 72: Test dwarf unwind
> 88: daemon operations
> 101: perf kvm tests
> 111: perf record tests
> 112: perf record sample filtering (by BPF) tests
> 117: perf sched tests
> 137: check-perf-trace python test
> 138: compaction-times python test
> 141: failed-syscalls-by-pid python test
> 142: failed-syscalls python test
> 144: futex-contention python test
> 157: sctop python test
> 159: stat-cpi python test
> root@x2:~# perf test 72
> 72: Test dwarf unwind : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> root@x2:~# perf test 88
> 88: daemon operations : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> root@x2:~# perf test 101
> 101: perf kvm tests : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> root@x2:~# perf test 112 ; perf test 117 ; perf test 137 ; perf test 141 ; perf test 142 ; perf test 144 ; perf test 157; perf test 159
> 112: perf record sample filtering (by BPF) tests : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> 117: perf sched tests : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> 137: check-perf-trace python test : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> 141: failed-syscalls-by-pid python test : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> 142: failed-syscalls python test : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> 144: futex-contention python test : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> 157: sctop python test : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> 159: stat-cpi python test : Ok
>
> === Test Summary ===
> Passed main tests : 1
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 0
> root@x2:~# uname -a
> Linux x2 7.2.5-200.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 11 15:11:05 UTC 2026 x86_64 GNU/Linux
> root@x2:~# cat /etc/os-release
> NAME="Fedora Linux"
> VERSION="44 (Workstation Edition)"
> RELEASE_TYPE=stable
> ID=fedora
> VERSION_ID=44
> VERSION_CODENAME=""
> PRETTY_NAME="Fedora Linux 44 (Workstation Edition)"
> ANSI_COLOR="0;38;2;60;110;180"
> LOGO=fedora-logo-icon
> CPE_NAME="cpe:/o:fedoraproject:fedora:44"
> DEFAULT_HOSTNAME="fedora"
> HOME_URL="https://fedoraproject.org/";
> DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f44/";
> SUPPORT_URL="https://ask.fedoraproject.org/";
> BUG_REPORT_URL="https://bugzilla.redhat.com/";
> REDHAT_BUGZILLA_PRODUCT="Fedora"
> REDHAT_BUGZILLA_PRODUCT_VERSION=44
> REDHAT_SUPPORT_PRODUCT="Fedora"
> REDHAT_SUPPORT_PRODUCT_VERSION=44
> SUPPORT_END=2027-05-19
> VARIANT="Workstation Edition"
> VARIANT_ID=workstation
> root@x2:~#

That's great! I'll dig into the flakes.

Thanks!
Ian