If you've spent years maintaining a pile of perf script Python or Perl hooks for tracing production systems, a patch series posted this weekend deserves your attention before you write it off as more kernel mailing list churn. It rips out the embedded Python and Perl interpreters that perf script has relied on for over a decade and replaces them with standalone Python scripts backed by a new C-based Python module, according to reporting from Phoronix (https://www.phoronix.com/news/Linux-Perf-Python-Module). That's not a minor refactor: it changes where your scripts live, how they get invoked, and potentially how much rewriting lands on your plate before this reaches a shipping kernel.
The questions below cover what's shifting, whether your existing integrations are at risk, and how to time your migration planning without panicking early or getting caught flat-footed when it lands.
What is actually being removed vs replaced in perf's scripting support?
This patch series removes the embedded interpreter model, where perf script loaded a Python or Perl runtime directly inside the perf binary and handed it trace events through an internal binding layer. That approach has been part of perf's scripting support for years, and it's the mechanism this patch series targets for removal, per Phoronix's coverage of the submission (https://www.phoronix.com/news/Linux-Perf-Python-Module).
What replaces it is a standalone Python module written in C that exposes perf's event data to ordinary Python scripts running as separate processes, rather than scripts executing inside perf's own address space. Perl scripting doesn't get an equivalent replacement; the series simply drops it as part of this cleanup, based on the patch series description. If your tooling depends on perf's Perl bindings, that's the piece with no forward path in the new architecture, at least not yet.
Will existing perf script Python/Perl scripts stop working once this lands?
Yes, for anything written against the old embedded API — flag this for your team now, before an upgrade breaks a monitoring pipeline. The embedded interpreter exposed a specific binding surface that your scripts imported implicitly just by running under perf script itself. Once that embedded layer is gone, scripts written for it have no host to run inside, so they won't execute unchanged.
Perl scripts are worse off: since the new architecture introduces no standalone-module equivalent for Perl, any Perl-based integration loses its migration path outright and needs a full rewrite in Python against the new module. Python scripts fare better structurally, because Python survives as the supported scripting language, but the calling convention changes. Your script becomes a standalone program that imports the new perf Python module rather than a fragment interpreted inside the perf process — that means audit and rework, not a drop-in swap. For more on this, see read about avx-512 xor_gen: check raid5/6 support in linux 7.4.
Why is the new standalone Python module approach faster than the embedded interpreter?
Phoronix describes the new C-written Python module as much faster than the status quo embedded scripting setup (https://www.phoronix.com/news/Linux-Perf-Python-Module). The available reporting doesn't break down specific benchmark numbers or the exact mechanism behind that speedup, so it's worth separating what's confirmed from what's inferred here.
Based on the architecture change alone, decoupling script execution from perf's internal interpreter loop likely removes overhead tied to marshaling event data across the embedded binding layer on every trace event. A purpose-built C module handing data to a standalone Python process is a more direct path than routing through a general-purpose embedded interpreter binding. That said, treat the magnitude of the speedup as an open question until the patch series lands with accompanying numbers or independent testing confirms it.
When might this patch series realistically merge into a mainline kernel release?
There's no confirmed merge date in the available reporting, and you should be skeptical of anyone claiming otherwise this early. What we do know is that this went out as a patch series this weekend, which places it at the very start of the review cycle rather than anywhere near landing (https://www.phoronix.com/news/Linux-Perf-Python-Module). This pairs well with our guide to does firefox's jpeg fix replace responsive images?.
Kernel subsystem overhauls of this scope — removing a long-standing scripting mechanism and dropping Perl support entirely — typically go through multiple rounds of maintainer review, mailing list feedback, and revised patch versions before a subsystem maintainer picks them up for a merge window. It's reasonable to expect at least one full development cycle of back-and-forth before mainline inclusion becomes likely, and possibly longer if maintainers push back on the Perl removal or the API design. Watch kernel mailing list discussion and follow-up coverage rather than assuming a specific kernel version target, since none has been confirmed yet.
What should you audit in your existing perf script integrations before this lands?
Start by inventorying every perf script hook in your environment and tagging each one by language. Anything in Perl needs a rewrite plan now, since there's no announced compatibility path for it in the new module. Anything in Python needs a closer look at exactly which embedded API calls it makes, because those calls are what the standalone module will need to replicate or replace.
Also read: context: gnome 51 release timeline: fedora vs ubuntu vs arch
Next, check whether your scripts are invoked directly by perf script as embedded targets, or wrapped by external orchestration tooling — CI pipelines, monitoring daemons, cron jobs — that call perf script and parse its output. Wrapper-style usage that only consumes perf script's text output, rather than embedding Python logic inside the trace, is far less exposed to this change than scripts that hook directly into perf's internal event callbacks.
Finally, note which kernel version your production and CI systems run today. Whether the old embedded scripting support coexists with the new module for a transition period, or disappears the moment this merges, isn't specified in the available reporting — don't assume a grace period you haven't confirmed.
Does this mean perf script scripting is being deprecated entirely?
No. Python scripting for perf script isn't going away — the series makes it a first-class standalone capability instead of a second-class embedded one. It's easy to misread this as perf abandoning scripting support, but the actual patch series description is closer to the opposite: it invests in scripting by giving it a faster, more maintainable foundation (https://www.phoronix.com/news/Linux-Perf-Python-Module).
The real casualty is Perl support and the specific embedded-API calling convention your old Python scripts used, not the concept of scripting perf traces in Python at all. If you maintain perf tooling, the right mental model is migration, not obsolescence. Budget time to port your Python hooks to the new module's calling style once it stabilizes, and start looking now for a Perl-to-Python rewrite if that's your gap.



