Skip to content

Conversation

@rkday-pro
Copy link
Contributor

The perf_event_open manpage (https://www.man7.org/linux/man-pages/man2/perf_event_open.2.html) says that ENOENT is "Returned if the type setting is not valid.". Prior to this fix, samply only switched to SwCpuClick on an EPERM error. This fix means that we try it speculatively whatever the error, unless it's a EPERM that can be fixed by changing the paranoia level.

(I've seen an ENOENT error when running samply on WSL2, where hardware counters aren't available.)

The `perf_event_open` manpage says that ENOENT is "Returned if the type
setting is not valid.". Prior to this fix, samply only switched to
SwCpuClick on an EPERM error. This fix means that we try it
speculatively whatever the error, unless it's a EPERM that can be fixed
by changing the paranoia level.
@mstange
Copy link
Owner

mstange commented Sep 11, 2023

Thanks!

@mstange mstange merged commit 422530a into mstange:main Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants