Paul, On Thu, 2010-09-30 at 02:04 +0100, Paul Mundt wrote: > On Mon, Sep 27, 2010 at 11:26:27PM +0100, Matt Fleming wrote: > > On Tue, Sep 28, 2010 at 12:07:03AM +0200, Robert Richter wrote: > > > On 27.09.10 16:01:38, Matt Fleming wrote: > > > > Well, ARM doesn't have names as strings for its pmus currently. What's > > > > more, ARM wouldn't use it; SH would be the only user of this function. I > > > > don't think this one makes sense to be a generic function. > > > > > Er, what? Yes it does. It has this silly id to string mapping thing that > is at present duplicated between the perf and the oprofile code for no > reason. Having a generic (albeit optional) perf_pmu_name() would allow > this to be cleaned up. > It's not as silly as it appears. As you mention below, OProfile uses strings to identify the correct CPU model in userspace. With ARM, there is some horrible legacy here which means that the strings are extremely misleading (arm/mpcore => arm/11mpcore, arm/armv7 => Cortex A8). Rather than continue this mess into perf, I decided to separate the two and use a common numeric scheme for when they have to talk to each other. > > > As the implementation of the function would be optional, why should we > > > make it architectural? > > > > I don't see why we should pollute the perf namespace with a function > > that is only being used inside the SH oprofile code? There would be > > exactly one use of this function and I doubt the perf guys will want > > this function exposed. In it's current state, it really is no use to any > > architecture other than SH. > > > This has nothing at all to do with the SH oprofile code and everything to > do with oprofile in general. This is the vary basis for the CPU model > matching in the oprofile userspace tools, it's string based by design. > Given that we're already seeing architetures double up their strings in > both places, this really wants a consensus and to be dealt with before > other architetures start getting the wrong idea. I agree that if you have sane strings for OProfile then there's no reason to define new ones for perf. Will -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html