On Thu, Apr 10, 2014 at 10:23 AM, Aram Santogidis <aram.santogi...@cern.ch> wrote: > Hi, > > I think I've figured out where the problem occurs. > > The latest version of the Xeon Phi kernel (linux-2.6.38+mpss3.2) does not > have the exclude_guest flag in struct perf_event_attr. The struct > perf_event_attr of libpfm defines the exclude_guest and sets it by default to > 1, effectively changing the __reserved_1 field of the linux version of > perf_event_attr (seen by the kernel). > > At the line 5740 in kernel/perf_event.c there is this check > > if (attr->__reserved_1) > return -EINVAL; > > which generates the error. > Yes, this is the problem. I will look into a solution for this. Thanks.
> Aram > > -----Original Message----- > From: Aram Santogidis > Sent: 08 April 2014 15:27 > To: perfmon2-devel@lists.sourceforge.net > Subject: Re: [perfmon2] [perfmon2:bugs] #5 exclude_guest field setting issue > on Intel Xeon Phi > > Hi, > > I encountered the same issue and concluded to the same conclusion with libpfm > 4.5.0. Setting "attr.exclude_guest = 0" solves the "Invalid argument" > problem. The KNC card that I'm using runs kernel version 2.6.38.8+mpss3.2. > > I'm trying to figure this out without success so far. Can you give me an > advice? > > Thanks, Aram > > ------------------------------ > Marie Curie Fellow, CERN > ICE-DIP project > > ------------------------------------------------------------------------------------------ > Hi, > > > On which kernel is this running on. I am trying to locate the difference with > Intel X86 code path here. Libpfm4 does set exclude_guest by default for let's > say SandyBridge and it does not cause a problem. So somewhere in the KNC code > path, this field value is flagged as bad. > > > On Mon, Jul 1, 2013 at 11:12 AM, Jean-Philippe HALIMI <jphalimi@...> wrote: >> ________________________________ >> >> [bugs:#5] exclude_guest field setting issue on Intel Xeon Phi >> >> Status: open >> Created: Mon Jul 01, 2013 09:12 AM UTC by Jean-Philippe HALIMI Last >> Updated: Mon Jul 01, 2013 09:12 AM UTC >> Owner: nobody >> >> As a driver for the Linux perf API, libpfm provides it with a >> perf_event_attr structure. Unfortunately, the structure available in >> the include/perfmon/perf_event.h file is not the same as the one in >> the linux header file (typically located in /usr/include/linux/perf_event.h). >> >> As a matter of fact, on Intel Xeon Phi, the perf_event_attr returned >> by pfm_get_os_event_encoding is considered as an invalid argument in >> the perf_event_open callback, because some fields are wrongly set. I >> found out that setting the libpfm4.4's perf_event.h >> perf_event_attr.exclude_guest attribute to 0 before calling >> perf_event_open solves the problem. As it is presented as a reserved >> bit in the linux's structure counterparts, I consider it as a hack and >> therefore recommend to do something in order to fix it. >> >> ________________________________ >> >> Sent from sourceforge.net because you indicated interest in >> https://sourceforge.net/p/perfmon2/bugs/5/ >> >> To unsubscribe from further messages, please visit >> https://sourceforge.net/auth/subscriptions/ > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > perfmon2-devel mailing list > perfmon2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel