Re: [BUG] perf stat: useless output for raw events with new eventparser

From: Robert Richter
Date: Thu Apr 26 2012 - 09:12:33 EST


On 26.04.12 12:27:11, Peter Zijlstra wrote:
> Furthermore, once we have a common format, we could even ask Intel/AMD
> (and other vendors) to provide their data in this format.

I don't think that can be done with a reasonable effort. Trying to
abstract the pmu description in sysfs to let user space know about the
pmu? We will never fit everything. And we have duplicate code,
esp. bit masks etc in the kernel and userland. What has been simple
bit mask macros in the past are now tons of bit name and mask pairs
provided by sysfs, generated by the kernel and reassembled in
userland. Could it be any more complicated? Really this can't be
handled.

Why not simply pass an identifier for each kind of pmu and then only
add pmu specific code in userland? Much easier than all this sysfs
format thing, where the kernel tries to tell userland what to do,
which the kernel never can do exactly. And even if we can describe
everything with sysfs, kernel and userland code becomes bloated, it
actually is already, looking at the recent perf tool and kernel
updates.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/