sources/perf: Add an explanatory comment for the CPU loop.

I stumbled over this kernel restriction, too.
This commit is contained in:
Eric Anholt
2018-05-16 09:37:40 +01:00
committed by Christian Hergert
parent 380995fde5
commit 83b75e6528

View File

@ -314,6 +314,9 @@ sp_perf_source_start_pid (SpPerfSource *self,
cpu = -1;
}
/* Perf won't let us capture on all CPUs on all pids, so we have to
* loop over CPUs if we're not just watching a single pid.
*/
for (; cpu < ncpu; cpu++)
{
attr.type = PERF_TYPE_HARDWARE;