summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.l
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-05-21 09:12:53 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-22 11:47:54 -0300
commit6b5fc39bdd781711d7da8b95ae0243df3b35c5bf (patch)
tree95b7a6062e5170da6121cd8486b0e4c7a921cf70 /tools/perf/util/parse-events.l
parent08d2f762ac4af861b962e543fceab341f05c8886 (diff)
downloadop-kernel-dev-6b5fc39bdd781711d7da8b95ae0243df3b35c5bf.zip
op-kernel-dev-6b5fc39bdd781711d7da8b95ae0243df3b35c5bf.tar.gz
perf tools: Add hardcoded name term for pmu events
Adding a new hardcoded term 'name' allowing to specify a name for the pmu event. The term is defined along with standard pmu terms. If no 'name' term is given, the event name follows following template: "raw 0x<perf_event_attr::config>" running: perf stat -e cpu/config=1,name=krava1/u ls will produce following output: ... Performance counter stats for 'ls': 0 krava1 ... running: perf stat -e cpu/config=1/u ls will produce following output: ... Performance counter stats for 'ls': 0 raw 0x1 ... Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1337584373-2741-6-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.l')
-rw-r--r--tools/perf/util/parse-events.l1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 331d28a..618a8e7 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -105,6 +105,7 @@ misses|miss { return str(PE_NAME_CACHE_OP_RESULT); }
config { return term(PARSE_EVENTS__TERM_TYPE_CONFIG); }
config1 { return term(PARSE_EVENTS__TERM_TYPE_CONFIG1); }
config2 { return term(PARSE_EVENTS__TERM_TYPE_CONFIG2); }
+name { return term(PARSE_EVENTS__TERM_TYPE_NAME); }
period { return term(PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD); }
branch_type { return term(PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
OpenPOWER on IntegriCloud