GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
aarch64 Performance Win

aarch64: Limit Arm SPE probes to PMU events

Speeds up GCC bootstrap on AArch64 by limiting Arm SPE profiling probes to PMU events.

This commit improves the speed of GCC’s bootstrap process on AArch64 systems by limiting performance counter probes for Arm Scalable Performance Monitoring Events (SPE). Previously, the autoprofile script would scan all available perf events, which could be slow on systems with many event types. By using perf list pmu, the probes now focus only on Performance Monitoring Unit (PMU) events, which include Arm SPE. This change reduces bootstrap time and ensures that the probe remains efficient without excluding relevant SPE events.

In Details

The autoprofile support in GCC (configure, gcc-auto-profile, and profopt.exp testsuite) previously used a general perf list command to discover Arm SPE profiling events. On AArch64 systems with numerous perf event classes, this broad scan can be time-consuming during bootstrap. This patch modifies all relevant call sites to use perf list pmu instead. This filters the perf event enumeration to only PMU events, which include the Arm SPE events, while significantly reducing the probe's execution time. This change is noted to save several minutes during end-to-end bootstrap on syste…

For Context
Arm SPE
Arm Scalable Performance Monitoring Events. A feature on certain Arm processors that provides fine-grained performance monitoring capabilities, allowing developers to collect detailed performance data.
PMU
Performance Monitoring Unit. Hardware blocks within a processor that count events such as instruction executions, cache misses, or branch mispredictions. perf uses PMUs to gather performance data.
aarch64
The 64-bit ARM architecture instruction set. GCC supports generating code for this architecture.
Bootstrap
The process of compiling a compiler using an older version of itself or another compiler. This is a standard procedure for building compilers from source and can be time-consuming.
perf list
A command-line utility (part of Linux's kernel tools) used to list available performance monitoring events on the system. perf list pmu specifically lists events associated with the Performance Monitoring Unit.
autoprofile
A GCC feature that automatically collects performance profiling data during compilation or runtime to help optimize the generated code. This commit affects how autoprofile discovers profiling hardware capabilities.
Filed Under: aarch64performanceprofilingbootstraptoolchain