Perf stat command fails

The perf command using the stat option used to be working well on Fedora (F43 Workstation) but since some weeks ago fails i.e. :

$ perf stat -d ls
Error:
No supported events found.

The “ls” command used is just an example. The actual executable doesn’t matter .

I could reproduce this change in behaviour for both F-WS 42 and F-WS 43 and both on an Intel laptop and AMD Desktop. I suppose the uptdate to the 6.19 kernel series is the culprit but can not verify it. Neither running the command as root nor setting /proc/sys/kernel/perf_event_paranoid to -1 helps.

Maybe a Gnome issue rather then a general Fedora issue?

Atleast on KDE plasma f43 your command works for me.

I am having the same problem. For now, downgrading perf to 6.17.1 solved the issue.

Given both of you see the problem suggest you report as a bug so it can be investigated by the maintainer- Making sure you're not a bot!

I did a F-KDE 43 install in a VM with the same result. Actual perf-6.19.x doesn’t work but older perf-6.17.1 does.

I have filed a bug report: 2452233 – Regression: perf stat command fails for 6.19.6 and later versions of 6.19

For the record I have perf-6.19.8-200.fc43.x86_64 and it’s working.
I wonder if its selinux related, I set selinux to permissive.

Edit: it’s not selinux. Tested in a VM.

Odd on my main development machine perf stat works.
But on any of my other systems it fails as you are seeing.

I wonder if there is something that needs to be configured to allow perf to work?
So far I cannot find that “thing” ion my working system.

FYI you can get a bit more info about the erro like this:

$ perf stat -v ls
Using CPUID GenuineIntel-6-9E-A
Control descriptor is not initialized
Error:
No supported events found.
# and in an ARM VM
$ perf stat -v ls
Using CPUID 0x00000000610f0000
Control descriptor is not initialized
Error:
No supported events found.

Maybe it is CPU model related. Both CPUs I use are older, they are from Intel Core 4000u and ZEN 2 series.

The machine that it works on perf stats report the CPU as Using CPUID GenuineIntel-6-97-2
And lscpu says it’s 12th Gen Intel(R) Core(TM) i7-12700K.