[PATCH v2 2/2] perf tools: Make Power7 events available for perf
Vince Weaver
vincent.weaver at maine.edu
Fri Jul 12 03:53:11 EST 2013
On Thu, 11 Jul 2013, Will Deacon wrote:
> On Tue, Jul 09, 2013 at 04:05:30PM +0100, Vince Weaver wrote:
> > libpfm4 uses the
> > CPU part : 0xc09
> > line in /proc/cpuinfo on ARM, and that's enough for the processors PAPI
>
> The CPU part you cite is actually A9-specific, so you probably want to
> probe each CPU specifically. Take a look at the cpuinfo parsing in OProfile
> (used by operf).
I meant we use the CPU part line to probe things. I just cut and pasted
from a Cortex A9 I had handy as an example.
> > And speaking of ARM, I should be railing at them for breaking the ABI too,
> > with their (understandable yet still ABI breaking) decision to remove
> > BogoMIPS from /proc/cpuinfo. That change will impact PAPI as well as
> > various other programs I maintain that have the misfortune of parsing that
> > file.
>
> Really? Why are you checking for that line at all?
Old programs.
PAPI dates back to the day when processor frequency was meaningful (and
stable). In cases where MHz wasn't reported in cpuinfo (mostly MIPS and
ARM) it tries to estimate it based on BogoMIPS. Not the sanest thing to
do, but it worked well enough at the time. We recently fixed things so it
should do something reasonable if BogoMIPS is missing, but if users wrote
their code poorly they can get divide by zero errors if BogoMIPS suddenly
goes missing from /proc/cpuinfo (and yes we have had a low but non-zero
number of users report bugs of this type).
Other programs I have (like linux_logo and ll) are 15+ years old and
simply print the BogoMIPS value for historical reasons. So they won't
break if the value goes away but it's still sad to see it go.
Vince
More information about the Linuxppc-dev
mailing list