Re: PM_L2_LD_MISS events doesn't work
Michael Petlan <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Organization | Red Hat |
| Message-ID | <1447698045.15375.125.camel@Rudolf-RHEL-7> |
Hi Carl, just a question... What does 'hypervisor' exactly mean here? Do you mean a PowerKVM host or a PowerVM one? Or does it apply to both? And finally, how does that work on a POWER8 machine that runs without virtualization? Are the events still not accessible there? Thanks, Michael On Fri, 2015-11-06 at 09:50 -0800, Carl E. Love wrote: > Chencheng Ye: > > I looked into the issue some more. The libpfm is not an issue. The > name to event number lookup is working fine. The PM_L2_LD_MISS event > generates the event code 0x426084. You can see the event code ocount is > using if you use the option --verbose. It will print something like: > > ocount --verbose -e PM_L2_LD_MISS ls > Final event code is 426084 > Number of events passed is 1 > Exec args are: ls > > where the "Final event code" is printed in decimal. > > The event requires the cache selector bit to be set to be set to 1 in > the processor performance counter setup register. On Power 8, this > register only writable by the hypervisor. So the kernel must reject any > event where the selector bit (bit 22) is not equal to 0. So until they > come up with an API so the kernel can issue a request to the hypervisor > to write the bit, any event with bit 22 set to a 1 will be rejected. > > This is an issue for OProfile and perf. OProfile (operf and ocount) are > actually using perf under the cover to setup and read the hardware > performance counters. The kernel code that does the rejection of the > event is actually the perf kernel code for Power 8. If you are really > interested, you can see the code in arch/powerpc/perf/power8-pmu.c. > > There is a comment at about line 77 of the file that describes the > register layout. Then lines 327 to 337 is where the code is that > actually checks that bit 22 is 1 and rejects the event if the bit is a > 1. > > So, that said, we need to update the list of supported OProfile events > to remove these until such time that the kernel is fixed. > > Carl Love > ------------------------------------------------------------------------------ Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now. http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140