diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-08-06 19:40:28 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-09 12:54:35 +0200 |
commit | 8f18aec535b5ca513dd13b531730177d35175ffa (patch) | |
tree | 6e1894685c1540c4b3f1c7dcef0315729ef3e9f1 /tools/perf/util | |
parent | 1c222bce7dd0cb9578b4c5cd3874a74f1db497c3 (diff) | |
download | kernel_samsung_smdk4412-8f18aec535b5ca513dd13b531730177d35175ffa.zip kernel_samsung_smdk4412-8f18aec535b5ca513dd13b531730177d35175ffa.tar.gz kernel_samsung_smdk4412-8f18aec535b5ca513dd13b531730177d35175ffa.tar.bz2 |
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')
-rw-r--r-- | tools/perf/util/parse-events.c | 8 | ||||
-rw-r--r-- | tools/perf/util/parse-events.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 7bdad8d..f77407b 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; } diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 1ea5d09..192a962 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h @@ -10,6 +10,7 @@ extern int nr_counters; extern struct perf_counter_attr attrs[MAX_COUNTERS]; extern char *event_name(int ctr); +extern char *__event_name(int type, u64 config); extern int parse_events(const struct option *opt, const char *str, int unset); |