On Tue, Jul 23, 2013 at 5:05 PM, Leonardo Piga <leonardo.p...@gmail.com> wrote: > Hello, > > I am trying to use libpfm4.4 and I am having some problems with syst example > (without any parameters). It is unable to open the counter, but it is with > libpfm4.3. > > When I ran, I got the following message: > > syst: cannot attach event to CPU0 cycles: Invalid argument > > I am running on a Intel(R) Core(TM)2 Duo CPU T9400 on kernel 2.6.32. > > Everything works fine with libpfm4.3. I tracked down the code and I figured > out that the reason is that exclude_guest and exclude_host are both set to 1 > on libpfm4.4 and they are not on libpfm4.3. > > So I did the following changes on lib/pfmlib_perf_event.c files (lines 224): > > attr->exclude_guest = 0; //!(vmx_plm & PFM_PLM3); > > After that, I was able to open the counters. > > I have already solved the problem by doing these changes, but I think it > would be valuable to report this issue. Any thoughts about what is going on > would be interested as well. > But it looks like you are running on a very old kernel unless it's RHEL5 or something like that. I suspect you're running into the sanity check of the kernel for unknown fields in the attr struct which must be zero.
Looks like I may need to add a kernel version test in pfmlib_perf_event.c, ugly but I think that is the only way to make libpfm4 work across all kernel versions. ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel