Re: [PATCH] CPU "IBM Power Architected Events V1" support added to the testsuite
Maynard Johnson <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 08/07/2014 03:08 PM, William Cohen wrote: > On 08/02/2014 12:20 PM, Michael Petlan wrote: >> Hi, >> >> I've debugged the problem a little... > > Hi Michael, > >> >> The gist of the identification problem is in the oprofile versions I've >> used during the testing. >> >> I am running two machines of that type, one with RHEL 6, one with RHEL 7. >> >> AT BASE PLATFORM is "power8" on both. >> AT PLATFORM is "power8" on RHEL 7 (newer kernel) and "power7" on RHEL 6 >> (2.6 kernel) as it is expectable (the CPU runs in the power7-compatibility >> mode). >> >> The git head ophelp returns "ppc64 POWER8" both on RHEL 6 and 7. On RHEL 6 >> it is because of the code in libop/op_cpu_type.c at lines 307-310. So when >> the latest git version is used, the "generic" (architected events) cpu_type >> is not used in the case of POWER8. > > I am no expert in the power performance monitoring hardware. I am hoping that Maynard can better describe what is the proper behavior for power8 machines. It was an intentional change for the cpu_type to be POWER8 instead of the generic (architected) name in this situation. The reason is that in order to get *any* profiling to work at all (whether for operf or perf), the IBM kernel team had to backport the entire POWER8 PMU code to the RHEL 6 kernel. As is typical, the kernel on older distros does not get completely updated to support new IBM Power processors. So when RHEL 6.5 is running on a POWER8, it's running in "POWER7 compat mode", and the kernel does not have the updated POWER8 code to take advantage of new facilities. But . . . for the case of the PMU, we actually do have the POWER8 support in RHEL 6.5 and can use the native POWER8 events instead of the architected events. > > Are there patches that need to be included in the updated rhel6 oprofile to have proper behavior? Similarly does it look like that we will to have some patches applied to rhel7 oprofile? It looks like the rhel7 oprofile is just the base oprofile 0.9.9 with respect to power. I think 0.9.7 is the version of oprofile included with RHEL 6.5, and that version does not even have operf. POWER8 can work with opcontrol, but only in timer mode. For RHEL 7, a POWER8 system would not be running in POWER7 compat mode (since all POWER8-specific kernel changes are available in RHEL 7), so this issue is moot on RHEL 7. > >> >> My another oprofile version based on 0.9.9 (before the commit 65176cb1) >> claims that it is "IBM Power Architected Events V1". >> >> I saw that CPU type and the fact, that there are no testcases being run >> in the testsuite, so I created the patch. It works, but it doesn't seem >> to be an ideal solution for my machines, because despite the fact the >> machines are virtual guests, they seem to support the same HW counters >> and events as POWER8 configuration. > > The ibm-compat-v1 events were added 2009-05-09 It looks like it is a set of base events that power6 and later support kind of a fallback like the Intel architected events. It seems like the testsuite should have something defined for it. That was a failed attempt at architecting events. We (IBM) have a formally documented (soon-to-be public) PMU architecture now (as of POWER8 timeframe), with a set of architected events. So all future IBM Power processors must implement at least this minimal set of architected events. The ibm-compat-v1 events are not supported by operf/ocount, so they will be removed with the upcoming 1.0 release where opcontrol et al will be removed. Hope this clears things up. -Maynard > >> >> I have to compare that with a non-virtual POWER8 machine. Then I'll be >> more sure in that. >> >> Regards, >> Michael > > -Will > >> >> On 1.8.2014 16:16, Maynard Johnson wrote: >>> But I'm a bit confused about your environment. As far as what I >>> know, the only way "ophelp -r" (using oprofile 0.9.9) will return >>> "IBM Power Architected Events V1" is if AT_PLATFORM (from aux vector) >>> is "POWER7" and AT_BASE_PLATFORM is "POWER8". But your /proc/cpuinfo >>> shows "POWER8", which would imply that AT_PLATFORM is also "POWER8". >>> >>> Can you describe your environment in detail please, just to humor me? :-) >>> >>> Thanks. >>> -Maynard >> >> ------------------------------------------------------------------------------ >> Want fast and easy access to all the code in your enterprise? Index and >> search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code >> search on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> _______________________________________________ >> oprofile-list mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/oprofile-list >> > ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk