Hello, On Friday, we decided to double check that the recently checked-in changes for Power7 are working for perfmon2 (and perf_counters).
So I set up a system with the latest 2.6.30 perfmon2 kernel, latest libpfm, and latest PAPI code. I ran the PAPI tests and immediately had a number of problems. The first problem is that there are missing groups in the power7_events.h file due to an error in the source file that I use to generate the C code. This can be corrected easily, and I will submit a patch later for it early next week. The second problem is that is that the mapping from PAPI events to native events required too many native events for PAPI_FP_OPS. This works OK for perf_counters, since it doesn't use the group tables to determine the values for the mmcr registers. However, the dispatch implementation in libpfm does use the groups, and there didn't exist a group containing all of the needed events. I can work around this by just removing one of the events so that a matching group can be found. We can probably generate a new group containing the needed event, and I will work on creating such a patch. (another solution would be to port the perf_counters code to libpfm, but that would be quite a lot of work) I left the worst for last: even running a simple test like libpfm/examples_v2.x/self, I get very inconsistent counts. Sometimes I get zeros! The numbers I get are almost always consistently less than they should be, which leads me to suspect that the pmd registers are getting zeroed out somewhere where they shouldn't be. I wasn't sure if this was due to some difference between Power7 and earlier chips, so I went and set up the same experiment on a Power5 machine, and the problem replicates there too. So this isn't a Power7-specific problem. Something changed between 2.6.29 and 2.6.30. When I run the same experiment on a perfmon2 2.6.29 kernel, the results are very consistent and look correct. I diffed the Power-specific source files that might have had some changes: arch/powerpc/perfmon/perfmon.c and arch/powerpc/perfmon/perfmon_power5.c but there are no differences between 2.6.29 and 2.6.30. Stephane, can you think of anything that you had to do in porting perfmon2 to 2.6.30 that might be causing this? Can you run examples_v2.x/self on x86 to see if you are seeing the same issue? Thanks for your consideration, - Corey Corey Ashford Software Engineer IBM Linux Technology Center, Linux Toolchain Beaverton, OR 503-578-3507 cjash...@us.ibm.com ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel