Any ideas why perf_event_open() would often return 0 CPU instructions retired when I pin a thread to a particular core?
perf_event_open() always get zero when specifying CPU ID

I am reading Perf performance counters using this example: https://gist.github.com/teqdruid/2473071 However, instead of: fd[0] = perf_event_open(&attr[0], getpid(), -1, -1, 0); I only want to ...

Stack Overflow