aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2012-11-05 08:50:52 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-11-08 14:12:03 -0500
commiteef9ba98b9ee96f52e544b09f581c397d8cc8265 (patch)
tree690231cc4f15dc2824b6d97439e84dbba60d5dad /tools
parent1fa0bc3f8d4f9bbcde5b1f962b006906cc80b2dc (diff)
perf tools: Add arbitary aliases and support names with -
- Add missing scanner symbol for arbitrary aliases inside the config region. - looks nicer than _, so allow - in the event names. Used for various of the arch perfmon and Haswell events. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1352123463-7346-6-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/parse-events.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index c87efc12579d..66959fab6634 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -81,6 +81,7 @@ num_dec [0-9]+
81num_hex 0x[a-fA-F0-9]+ 81num_hex 0x[a-fA-F0-9]+
82num_raw_hex [a-fA-F0-9]+ 82num_raw_hex [a-fA-F0-9]+
83name [a-zA-Z_*?][a-zA-Z0-9_*?]* 83name [a-zA-Z_*?][a-zA-Z0-9_*?]*
84name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?]*
84modifier_event [ukhpGH]{1,8} 85modifier_event [ukhpGH]{1,8}
85modifier_bp [rwx]{1,3} 86modifier_bp [rwx]{1,3}
86 87
@@ -168,6 +169,7 @@ period { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD); }
168branch_type { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); } 169branch_type { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
169, { return ','; } 170, { return ','; }
170"/" { BEGIN(INITIAL); return '/'; } 171"/" { BEGIN(INITIAL); return '/'; }
172{name_minus} { return str(yyscanner, PE_NAME); }
171} 173}
172 174
173mem: { BEGIN(mem); return PE_PREFIX_MEM; } 175mem: { BEGIN(mem); return PE_PREFIX_MEM; }