Linux's Perf Script Command Much Faster With Overhaul As Python Module

Linux's Perf Script Command Much Faster With Overhaul As Python Module

A big patch series sent out this weekend for the Linux kernel's perf subsystem removes the embedded Python and Perl scripting in favor of standalone Python scripts with a new Python perf module. This perf module for Python written in C is much faster than the status quo. Google engineer Ian Rogers has carried out the overhaul of the perf script command to address its high overhead, complex build dependencies, and other design challenges by creating a proper perf module for Python. With this perf Python C extension module there is much faster performance such as a Python script previously taking 3.7 seconds to now just 0.1 seconds with a standalone Python script and using the new perf module. The set of 49 patches sent out on Saturday transition the Python perf code to using the new perf module as well as dropping the old libpython-based code and legacy Python scripts. It's a ~21k lines of code overhaul for improving the Linux perf scripting process. Gemini 3.1 Pro assisted Rogers with this overhaul. Those making use of Linux perf with Python scripting can learn more about this fundamental change currently under review on the mailing list via this patch series.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.