You are not logged in.

#1 2019-06-03 23:11:22

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

[SOLVED]perf stopped working "(Invalid argument) for event (cycles:u)"

Since recently running perf record with or without root ends up with this error.

$ perf record -g ls
Error:
The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cycles:u).
/bin/dmesg | grep -i perf may provide additional information.

Dmesg doesn't provide an additional information.

Results I'm getting from a search engine are old bugreports, misconfigured kernels, and patches. Neither seems to apply.

I thought it's a microcode or kernel regression, so I tried, separately:

  1. Disabling "teo governor" I'm using

  2. Installing and running linux-lts 4.19.47

  3. Removing amd-ucode as well as disabling cpu-microcode update from the firmware package by executing

    sudo ln -s /dev/null /etc/tmpfiles.d/linux-firmware.conf
  4. Installing an older 5.0.2 kernel (in case it's caused by a "minor" kernel update)

  5. Running perf inside Fedora 30 Live USB

Nothing helped, I'm kind of lost about what could've happened.

My dmesg is here. CPU: AMD A8-3530MX

upd: tried some more things

Last edited by Hi-Angel (2019-07-13 12:28:13)

Offline

#2 2019-06-05 00:03:47

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED]perf stopped working "(Invalid argument) for event (cycles:u)"

Since I exhausted all simple explanations, I figured the best way to move forward would be to create an upstream report: https://bugzilla.kernel.org/show_bug.cgi?id=203811

Offline

#3 2019-07-13 12:27:42

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED]perf stopped working "(Invalid argument) for event (cycles:u)"

This was fixed with this commit. Per my understanding, this commit will be available since 5.3 kernel.

Note: if anyone wants to test it, you'll have to compile not the kernel package with the patch, but rather the perf package https://www.archlinux.org/packages/comm … 6_64/perf/

Last edited by Hi-Angel (2019-07-13 12:29:33)

Offline

Board footer

Powered by FluxBB