summaryrefslogtreecommitdiff
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-08-06 19:40:28 +0200
committerIngo Molnar <mingo@elte.hu>2009-08-09 12:54:35 +0200
commit8f18aec535b5ca513dd13b531730177d35175ffa (patch)
tree6e1894685c1540c4b3f1c7dcef0315729ef3e9f1 /tools/perf/util/parse-events.c
parent1c222bce7dd0cb9578b4c5cd3874a74f1db497c3 (diff)
downloadlwn-8f18aec535b5ca513dd13b531730177d35175ffa.tar.gz
lwn-8f18aec535b5ca513dd13b531730177d35175ffa.zip
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>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 7bdad8df22a6..f77407b5832e 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -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;
}