Ported perf code to work on arm and adjusted to changes in the kernel th...

...at broke mmap().

The kernel doesn't allow anymore to setup a perf fd with any cpu and the inherit flag
(to take into account threads created later on), so now we setup a fd/mmap area for each
cpu in the system.