sys_perf_event_open: No such file or directory
Trying to run example program but getting the following error
At event 18/32
sys_perf_event_open: No such file or directory
@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).
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.
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.