perf report: Fix per task mult-counter stat reporting

Brice Goglin reported:

> I can easily sort them by thread id, but I don't know how to match
> my 4 events with each group of 4 lines.

Also report the counter id and the time running/enabled
stats (in case the counter got time-shared).

Reported-by: Brice Goglin <Brice.Goglin@inria.fr>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Brice Goglin <Brice.Goglin@inria.fr>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Peter Zijlstra
2009-08-06 19:40:28 +02:00
committed by Ingo Molnar
parent 1c222bce7d
commit 8f18aec535
3 changed files with 35 additions and 5 deletions

View File

@@ -223,9 +223,15 @@ char *event_name(int counter)
{
u64 config = attrs[counter].config;
int type = attrs[counter].type;
return __event_name(type, config);
}
char *__event_name(int type, u64 config)
{
static char buf[32];
if (attrs[counter].type == PERF_TYPE_RAW) {
if (type == PERF_TYPE_RAW) {
sprintf(buf, "raw 0x%llx", config);
return buf;
}