> On 22 Jul 2026, at 04:00, Kugan Vivekanandarajah <[email protected]> > wrote: > > > >> On 22 Jul 2026, at 2:30 am, Kyrylo Tkachov <[email protected]> wrote: >> >> >> >>> On 21 Jul 2026, at 18:03, Andi Kleen <[email protected]> wrote: >>> >>> On Tue, Jul 21, 2026 at 04:29:15PM +0200, [email protected] wrote: >>>> From: Kyrylo Tkachov <[email protected]> >>>> >>>> The autoprofile bootstrap support probes for Arm SPE from gcc/configure, >>>> gcc-auto-profile, and the profile-optimization testsuite support. Each >>>> bare "perf list" scans every event class even though arm_spe is a PMU. >>>> This can make the probe unnecessarily slow on systems with many events. >>>> >>>> Use "perf list pmu" at all three call sites. The PMU event class filter >>>> has long been supported by perf and still reports arm_spe. Stubbed BRBE, >>>> SPE, and fallback paths select the same profiler as before. >>>> >>>> This patch actually saves a few minutes of end-to-end bootstrap time on my >>>> SPE >>>> AArch64 many-core system. >>> >>> Or just -d /sys/devices/arm_spe ? (or what the right PMU name is) >>> But yes it's a clear improvement. >> >> I think it has to be /sys/bus/event_source/devices/arm_spe_0 after >> https://github.com/torvalds/linux/commit/4052ce07d5d7 > test -d /sys/devices/arm_spe_0/ also seems to work
Yes, but it may be not guaranteed to be there? The kernel commit I linked says: “Currently the PMU device appears directly under /sys/devices/ Only root busses should appear there, so instead assign the pmu->dev parent to be the platform device.” So does that mean on some kernels it won’t appear there or need root? >> >> Tbh "perf list pmu” looks easier to me unless there are concerns with perf >> availability or something? >> >> >>> >>> BTW do you actually see a faster compiler out of autoprofiledbootstrap? >>> I currently don't on x86. >> >> I haven’t done thorough evaluation of that myself (isolated compute time on >> my big build machines is hard to get exclusively at the moment), I was just >> picking some low hanging fruit on improving bootstrap times on aarch64. >> >> Thanks for looking at this, >> Kyrill >> >>> >>> -Andi > >
