Hello,


On Fri, Jun 15, 2012 at 12:07 PM, Will Deacon <will.deacon@arm.com> wrote:
I'm posting this as an RFC due to the following hurdles:

1.) I've probably broken ppc64 with my /proc/cpuinfo parser changes but
   I don't have a relevant machine on which to test the patch.

2.) Cross-compiling for ARM doesn't work and I see the following error
   during configure:

       checking kernel version supports perf_events... This kernel has perf_events support
       checking for "/usr/include/linux/perf_event.h"... configure: error: cannot check for file existence when cross compiling

   perhaps we should have a --with-perf-events option or something
   similar?

3.) operf requests exclude_idle=1 in the perf_event_attr passed to the
   kernel. ARM cores do not support this mode exclusion and requesting
   it will give you -EPERM (which is the wrong error code -- I'll fix
   this in the kernel...).

We are working on adding MIPS support to operf, and ran into similar issues. We also plan to use /proc/cpuinfo for CPU type detection, so we would be happy to use the generalized code from this patch.

We also saw that oprofile does not cross-compile nicely, and planned to fix it, if someone else doesn't fix it first.

Best Regards,
Gergely Kis