From: Maynard J. <may...@us...> - 2012-06-15 18:41:37
|
On 06/15/2012 05:07 AM, Will Deacon wrote: > Hello, > > Following on from Maynard's post advertising the perf-events branch: > > http://sourceforge.net/mailarchive/message.php?msg_id=29390076 > > These couple of patches add support for ARM cores to operf. There are a > number of recent ARMv7 cores that I will support in additional patches > (I just need to sit down and write the events files) when this has > settled down. > > 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. Works great on ppc64, too! Thanks for factoring out the /proc/cpuinfo scanning code. > > 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? Agreed. > > 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...). Yes, as I think about it now, we should NOT exclude_idle by default since native events are designed to either include or exclude events while idle; for example, on ppc64, we have PM_CYC and PM_RUN_CYC, where the former counts all cycles, even in idle, and the latter counts cycles only when the run latch is set. So I will change this. Thanks much for your testing, your comments, and your code contribution. -Maynard > > All feedback welcome, > > Will > > > Will Deacon (2): > Factor out ppc64 /proc/cpuinfo parsing > Add ARM cpu type parsing using /proc/cpuinfo > > libop/op_cpu_type.c | 132 +++++++++++++++++++++++++++++++++++++++----------- > 1 files changed, 103 insertions(+), 29 deletions(-) > |