libperf icon indicating copy to clipboard operation
libperf copied to clipboard

sys_perf_event_open: No such file or directory

Open andrewmilson opened this issue 9 years ago • 3 comments

Trying to run example program but getting the following error

At event 18/32
sys_perf_event_open: No such file or directory

andrewmilson avatar Feb 14 '16 04:02 andrewmilson

@andrewmilson thanks for reporting this. I don't get much time to work on this library, but I will try to take a look tonight (EST).

theonewolf avatar Jun 20 '17 12:06 theonewolf

I had ran into a similar issue (but event was 17/32) with a revision from around maybe a year ago. My issue appears to be fixed in the current revision so this issue might be fixed too.

khouli avatar Mar 17 '18 20:03 khouli

I think I know what the problem is... I believe that some of the performance counters are not available on some CPUs. In @andrewmilson's case, it looks like LIBPERF_COUNT_HW_CACHE_L1D_PREFETCHES (counter #18) is not available or not enabled on his system.

To fix this we should probably just ignore counters that we can't open in libperf_initialize. I might submit a pull request with a fix if I end up needing to use this.

jremmons avatar Apr 05 '18 00:04 jremmons