diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-03-15 15:09:16 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-03-16 13:26:06 -0400 |
commit | 8f707d843c2f4023490a873dbc182f632a3a5906 (patch) | |
tree | e4c6d509756aa869314888de0d5873c4a20a7e92 /tools/perf/util/parse-events-bison.h | |
parent | 89812fc81f8d62d70433a8ff63d26819f372e8ec (diff) |
perf tools: Add config options support for event parsing
Adding a new rule to the event grammar to be able to specify
values of additional attributes of symbolic event.
The new syntax for event symbolic definition is:
event_legacy_symbol: PE_NAME_SYM '/' event_config '/' |
PE_NAME_SYM sep_slash_dc
event_config: event_config ',' event_term | event_term
event_term: PE_NAME '=' PE_NAME |
PE_NAME '=' PE_VALUE
PE_NAME
sep_slash_dc: '/' | ':' |
At the moment the config options are hardcoded to be used for legacy
symbol events to define several perf_event_attr fields. It is:
'config' to define perf_event_attr::config
'config1' to define perf_event_attr::config1
'config2' to define perf_event_attr::config2
'period' to define perf_event_attr::sample_period
Legacy events could be now specified as:
cycles/period=100000/
If term is specified without the value assignment, then 1 is
assigned by default.
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-mgkavww9790jbt2jdkooyv4q@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events-bison.h')
-rw-r--r-- | tools/perf/util/parse-events-bison.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tools/perf/util/parse-events-bison.h b/tools/perf/util/parse-events-bison.h index 097a6323e6a9..c58b76584f92 100644 --- a/tools/perf/util/parse-events-bison.h +++ b/tools/perf/util/parse-events-bison.h | |||
@@ -41,14 +41,15 @@ | |||
41 | PE_VALUE = 258, | 41 | PE_VALUE = 258, |
42 | PE_VALUE_SYM = 259, | 42 | PE_VALUE_SYM = 259, |
43 | PE_RAW = 260, | 43 | PE_RAW = 260, |
44 | PE_NAME = 261, | 44 | PE_TERM = 261, |
45 | PE_MODIFIER_EVENT = 262, | 45 | PE_NAME = 262, |
46 | PE_MODIFIER_BP = 263, | 46 | PE_MODIFIER_EVENT = 263, |
47 | PE_NAME_CACHE_TYPE = 264, | 47 | PE_MODIFIER_BP = 264, |
48 | PE_NAME_CACHE_OP_RESULT = 265, | 48 | PE_NAME_CACHE_TYPE = 265, |
49 | PE_PREFIX_MEM = 266, | 49 | PE_NAME_CACHE_OP_RESULT = 266, |
50 | PE_PREFIX_RAW = 267, | 50 | PE_PREFIX_MEM = 267, |
51 | PE_ERROR = 268 | 51 | PE_PREFIX_RAW = 268, |
52 | PE_ERROR = 269 | ||
52 | }; | 53 | }; |
53 | #endif | 54 | #endif |
54 | 55 | ||
@@ -59,15 +60,17 @@ typedef union YYSTYPE | |||
59 | { | 60 | { |
60 | 61 | ||
61 | /* Line 1685 of yacc.c */ | 62 | /* Line 1685 of yacc.c */ |
62 | #line 42 "util/parse-events.y" | 63 | #line 45 "util/parse-events.y" |
63 | 64 | ||
64 | char *str; | 65 | char *str; |
65 | unsigned long num; | 66 | unsigned long num; |
67 | struct list_head *head; | ||
68 | struct parse_events__term *term; | ||
66 | 69 | ||
67 | 70 | ||
68 | 71 | ||
69 | /* Line 1685 of yacc.c */ | 72 | /* Line 1685 of yacc.c */ |
70 | #line 71 "util/parse-events-bison.h" | 73 | #line 74 "util/parse-events-bison.h" |
71 | } YYSTYPE; | 74 | } YYSTYPE; |
72 | # define YYSTYPE_IS_TRIVIAL 1 | 75 | # define YYSTYPE_IS_TRIVIAL 1 |
73 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 76 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |