[tip:perf/stat] perf stat: Make all displayed event names parseable as well

From: tip-bot for Ingo Molnar
Date: Wed Apr 27 2011 - 12:01:31 EST


Commit-ID: 749141d926faf23ef811686a8050e7cf13dc223f
Gitweb: http://git.kernel.org/tip/749141d926faf23ef811686a8050e7cf13dc223f
Author: Ingo Molnar <mingo@xxxxxxx>
AuthorDate: Wed, 27 Apr 2011 04:24:57 +0200
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Tue, 26 Apr 2011 20:04:55 +0200

perf stat: Make all displayed event names parseable as well

Right now we display this by default:

0.202204 task-clock-msecs # 0.282 CPUs
0 context-switches # 0.000 M/sec
0 CPU-migrations # 0.000 M/sec
85 page-faults # 0.420 M/sec

The task-clock-msecs event cannot actually be passed back as an
event name, the event name we recognize is 'task-clock'.

So change the output of the cpu-clock and task-clock events
to be idempotent.

( Units should be printed out in the right-side column, if needed. )

Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Acked-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-lexrnbzy09asscgd4f7oac4i@xxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
tools/perf/util/parse-events.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index b686269..b5bfef1 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -70,8 +70,8 @@ static const char *hw_event_names[] = {
};

static const char *sw_event_names[] = {
- "cpu-clock-msecs",
- "task-clock-msecs",
+ "cpu-clock",
+ "task-clock",
"page-faults",
"context-switches",
"CPU-migrations",
--
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/