We were using some of the perf_event functionality in an susupported way   and this broke recently when the perf_event interface was made more strict.
We were using some of the perf_event functionality in an susupported way
  and this broke recently when the perf_event interface was made more strict.

You can't use the PERF_EVENT_IOC_REFRESH ioctl on a group leader to
   start all sampling siblings... use PERF_EVENT_IOC_ENABLE

Don't pass NULL or 0 as the argument to the PERF_EVENT_IOC_REFRESH ioctl.

These fixes seem to work and fix the Nehalem regressions.  The above changes
were made to PAPI back in November to fix the I/O possible error, so
we should check to be sure that this doesn't reintroduce the problem.

We should also probably back-port this fix to 4.1.2 and 4.2 stable

pyrovski/papi,arm-hpc/papi,arm-hpc/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi