On 08/23/2009 06:48 AM, stephane eranian wrote:
> Corey,
>
> On Sun, Aug 23, 2009 at 4:00 AM, Corey
> Ashford<cjash...@linux.vnet.ibm.com>  wrote:
>> Hello,
>>
>> On Friday, we decided to double check that the recently checked-in changes
>> for Power7 are working for perfmon2 (and perf_counters).
>>
> good idea.
>
>> 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.
>>
> I don't see any major changes.
>
> Here are a couple of tests you could try and run to narrow it down:
>      - taskset -c 0 self
>      - syst
>
> Do those produce more stable and valid results?
>
>> Stephane, can you think of anything that you had to do in porting
>> perfmon2 to 2.6.30 that might be causing this?
>>
>
> Not enough data to figure it out.
>
>> Can you run examples_v2.x/self on x86 to see if you are seeing
>> the same issue?
>>
> I did and it is stable and correct. So must be something in the
> Power code or something in the generic code which impacts only
> Power.

Thanks, Stephane.  I'll look deeper into this issue tomorrow (work day).

- Corey

------------------------------------------------------------------------------
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

Reply via email to