Zheng Yan | ac20de6f | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 1 | %pure-parser |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 2 | %parse-param {void *_data} |
Zheng Yan | ac20de6f | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 3 | %parse-param {void *scanner} |
| 4 | %lex-param {void* scanner} |
Jiri Olsa | 6297d42 | 2015-04-22 21:10:17 +0200 | [diff] [blame] | 5 | %locations |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 6 | |
| 7 | %{ |
| 8 | |
| 9 | #define YYDEBUG 1 |
| 10 | |
| 11 | #include <linux/compiler.h> |
| 12 | #include <linux/list.h> |
Borislav Petkov | d944c4e | 2014-04-25 21:31:02 +0200 | [diff] [blame] | 13 | #include <linux/types.h> |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 14 | #include "util.h" |
| 15 | #include "parse-events.h" |
Zheng Yan | ac20de6f | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 16 | #include "parse-events-bison.h" |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 17 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 18 | #define ABORT_ON(val) \ |
| 19 | do { \ |
| 20 | if (val) \ |
| 21 | YYABORT; \ |
| 22 | } while (0) |
| 23 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 24 | #define ALLOC_LIST(list) \ |
| 25 | do { \ |
| 26 | list = malloc(sizeof(*list)); \ |
| 27 | ABORT_ON(!list); \ |
| 28 | INIT_LIST_HEAD(list); \ |
| 29 | } while (0) |
| 30 | |
Namhyung Kim | 97f63e4 | 2013-01-22 18:09:29 +0900 | [diff] [blame] | 31 | static inc_group_count(struct list_head *list, |
| 32 | struct parse_events_evlist *data) |
| 33 | { |
| 34 | /* Count groups only have more than 1 members */ |
| 35 | if (!list_is_last(list->next, list)) |
| 36 | data->nr_groups++; |
| 37 | } |
| 38 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 39 | %} |
| 40 | |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 41 | %token PE_START_EVENTS PE_START_TERMS |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 42 | %token PE_VALUE PE_VALUE_SYM_HW PE_VALUE_SYM_SW PE_RAW PE_TERM |
Robert Richter | ac2ba9f | 2012-08-16 21:10:21 +0200 | [diff] [blame] | 43 | %token PE_EVENT_NAME |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 44 | %token PE_NAME |
Wang Nan | d509db0 | 2015-10-14 12:41:20 +0000 | [diff] [blame] | 45 | %token PE_BPF_OBJECT PE_BPF_SOURCE |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 46 | %token PE_MODIFIER_EVENT PE_MODIFIER_BP |
| 47 | %token PE_NAME_CACHE_TYPE PE_NAME_CACHE_OP_RESULT |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 48 | %token PE_PREFIX_MEM PE_PREFIX_RAW PE_PREFIX_GROUP |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 49 | %token PE_ERROR |
Kan Liang | ba32a45 | 2014-10-07 11:08:51 -0400 | [diff] [blame] | 50 | %token PE_PMU_EVENT_PRE PE_PMU_EVENT_SUF PE_KERNEL_PMU_EVENT |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 51 | %type <num> PE_VALUE |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 52 | %type <num> PE_VALUE_SYM_HW |
| 53 | %type <num> PE_VALUE_SYM_SW |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 54 | %type <num> PE_RAW |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 55 | %type <num> PE_TERM |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 56 | %type <str> PE_NAME |
Wang Nan | 84c86ca | 2015-10-14 12:41:14 +0000 | [diff] [blame] | 57 | %type <str> PE_BPF_OBJECT |
Wang Nan | d509db0 | 2015-10-14 12:41:20 +0000 | [diff] [blame] | 58 | %type <str> PE_BPF_SOURCE |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 59 | %type <str> PE_NAME_CACHE_TYPE |
| 60 | %type <str> PE_NAME_CACHE_OP_RESULT |
| 61 | %type <str> PE_MODIFIER_EVENT |
| 62 | %type <str> PE_MODIFIER_BP |
Robert Richter | ac2ba9f | 2012-08-16 21:10:21 +0200 | [diff] [blame] | 63 | %type <str> PE_EVENT_NAME |
Kan Liang | ba32a45 | 2014-10-07 11:08:51 -0400 | [diff] [blame] | 64 | %type <str> PE_PMU_EVENT_PRE PE_PMU_EVENT_SUF PE_KERNEL_PMU_EVENT |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 65 | %type <num> value_sym |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 66 | %type <head> event_config |
Arnaldo Carvalho de Melo | 1d55e8e | 2016-02-19 18:45:12 -0300 | [diff] [blame] | 67 | %type <head> opt_event_config |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 68 | %type <term> event_term |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 69 | %type <head> event_pmu |
| 70 | %type <head> event_legacy_symbol |
| 71 | %type <head> event_legacy_cache |
| 72 | %type <head> event_legacy_mem |
| 73 | %type <head> event_legacy_tracepoint |
He Kuang | 865582c | 2015-09-28 03:52:15 +0000 | [diff] [blame] | 74 | %type <tracepoint_name> tracepoint_name |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 75 | %type <head> event_legacy_numeric |
| 76 | %type <head> event_legacy_raw |
Wang Nan | 84c86ca | 2015-10-14 12:41:14 +0000 | [diff] [blame] | 77 | %type <head> event_bpf_file |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 78 | %type <head> event_def |
Robert Richter | ac2ba9f | 2012-08-16 21:10:21 +0200 | [diff] [blame] | 79 | %type <head> event_mod |
| 80 | %type <head> event_name |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 81 | %type <head> event |
| 82 | %type <head> events |
| 83 | %type <head> group_def |
| 84 | %type <head> group |
| 85 | %type <head> groups |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 86 | |
| 87 | %union |
| 88 | { |
| 89 | char *str; |
Robert Richter | b527bab | 2012-08-07 19:43:13 +0200 | [diff] [blame] | 90 | u64 num; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 91 | struct list_head *head; |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 92 | struct parse_events_term *term; |
He Kuang | 865582c | 2015-09-28 03:52:15 +0000 | [diff] [blame] | 93 | struct tracepoint_name { |
| 94 | char *sys; |
| 95 | char *event; |
| 96 | } tracepoint_name; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 97 | } |
| 98 | %% |
| 99 | |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 100 | start: |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 101 | PE_START_EVENTS start_events |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 102 | | |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 103 | PE_START_TERMS start_terms |
| 104 | |
| 105 | start_events: groups |
| 106 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 107 | struct parse_events_evlist *data = _data; |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 108 | |
| 109 | parse_events_update_lists($1, &data->list); |
| 110 | } |
| 111 | |
| 112 | groups: |
| 113 | groups ',' group |
| 114 | { |
| 115 | struct list_head *list = $1; |
| 116 | struct list_head *group = $3; |
| 117 | |
| 118 | parse_events_update_lists(group, list); |
| 119 | $$ = list; |
| 120 | } |
| 121 | | |
| 122 | groups ',' event |
| 123 | { |
| 124 | struct list_head *list = $1; |
| 125 | struct list_head *event = $3; |
| 126 | |
| 127 | parse_events_update_lists(event, list); |
| 128 | $$ = list; |
| 129 | } |
| 130 | | |
| 131 | group |
| 132 | | |
| 133 | event |
| 134 | |
| 135 | group: |
| 136 | group_def ':' PE_MODIFIER_EVENT |
| 137 | { |
| 138 | struct list_head *list = $1; |
| 139 | |
| 140 | ABORT_ON(parse_events__modifier_group(list, $3)); |
| 141 | $$ = list; |
| 142 | } |
| 143 | | |
| 144 | group_def |
| 145 | |
| 146 | group_def: |
| 147 | PE_NAME '{' events '}' |
| 148 | { |
| 149 | struct list_head *list = $3; |
| 150 | |
Namhyung Kim | 97f63e4 | 2013-01-22 18:09:29 +0900 | [diff] [blame] | 151 | inc_group_count(list, _data); |
Arnaldo Carvalho de Melo | 63dab22 | 2012-08-14 16:35:48 -0300 | [diff] [blame] | 152 | parse_events__set_leader($1, list); |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 153 | $$ = list; |
| 154 | } |
| 155 | | |
| 156 | '{' events '}' |
| 157 | { |
| 158 | struct list_head *list = $2; |
| 159 | |
Namhyung Kim | 97f63e4 | 2013-01-22 18:09:29 +0900 | [diff] [blame] | 160 | inc_group_count(list, _data); |
Arnaldo Carvalho de Melo | 63dab22 | 2012-08-14 16:35:48 -0300 | [diff] [blame] | 161 | parse_events__set_leader(NULL, list); |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 162 | $$ = list; |
| 163 | } |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 164 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 165 | events: |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 166 | events ',' event |
| 167 | { |
| 168 | struct list_head *event = $3; |
| 169 | struct list_head *list = $1; |
| 170 | |
| 171 | parse_events_update_lists(event, list); |
| 172 | $$ = list; |
| 173 | } |
| 174 | | |
| 175 | event |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 176 | |
Robert Richter | ac2ba9f | 2012-08-16 21:10:21 +0200 | [diff] [blame] | 177 | event: event_mod |
| 178 | |
| 179 | event_mod: |
| 180 | event_name PE_MODIFIER_EVENT |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 181 | { |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 182 | struct list_head *list = $1; |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 183 | |
Jiri Olsa | 5d7be90 | 2012-03-20 19:15:40 +0100 | [diff] [blame] | 184 | /* |
| 185 | * Apply modifier on all events added by single event definition |
| 186 | * (there could be more events added for multiple tracepoint |
| 187 | * definitions via '*?'. |
| 188 | */ |
Jiri Olsa | f5b1135 | 2012-08-08 12:21:54 +0200 | [diff] [blame] | 189 | ABORT_ON(parse_events__modifier_event(list, $2, false)); |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 190 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 191 | } |
| 192 | | |
Robert Richter | ac2ba9f | 2012-08-16 21:10:21 +0200 | [diff] [blame] | 193 | event_name |
| 194 | |
| 195 | event_name: |
| 196 | PE_EVENT_NAME event_def |
| 197 | { |
| 198 | ABORT_ON(parse_events_name($2, $1)); |
| 199 | free($1); |
| 200 | $$ = $2; |
| 201 | } |
| 202 | | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 203 | event_def |
| 204 | |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 205 | event_def: event_pmu | |
| 206 | event_legacy_symbol | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 207 | event_legacy_cache sep_dc | |
| 208 | event_legacy_mem | |
| 209 | event_legacy_tracepoint sep_dc | |
| 210 | event_legacy_numeric sep_dc | |
Wang Nan | 84c86ca | 2015-10-14 12:41:14 +0000 | [diff] [blame] | 211 | event_legacy_raw sep_dc | |
| 212 | event_bpf_file |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 213 | |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 214 | event_pmu: |
| 215 | PE_NAME '/' event_config '/' |
| 216 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 217 | struct parse_events_evlist *data = _data; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 218 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 219 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 220 | ALLOC_LIST(list); |
Jiri Olsa | 36adec8 | 2015-04-22 21:10:19 +0200 | [diff] [blame] | 221 | ABORT_ON(parse_events_add_pmu(data, list, $1, $3)); |
Arnaldo Carvalho de Melo | 2146afc | 2016-02-12 17:09:17 -0300 | [diff] [blame] | 222 | parse_events_terms__delete($3); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 223 | $$ = list; |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 224 | } |
Adrian Hunter | ad96227 | 2014-08-15 22:08:40 +0300 | [diff] [blame] | 225 | | |
Kan Liang | ba32a45 | 2014-10-07 11:08:51 -0400 | [diff] [blame] | 226 | PE_KERNEL_PMU_EVENT sep_dc |
| 227 | { |
| 228 | struct parse_events_evlist *data = _data; |
| 229 | struct list_head *head; |
| 230 | struct parse_events_term *term; |
| 231 | struct list_head *list; |
| 232 | |
| 233 | ALLOC_LIST(head); |
| 234 | ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER, |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 235 | $1, 1, &@1, NULL)); |
Kan Liang | ba32a45 | 2014-10-07 11:08:51 -0400 | [diff] [blame] | 236 | list_add_tail(&term->list, head); |
| 237 | |
| 238 | ALLOC_LIST(list); |
Jiri Olsa | 36adec8 | 2015-04-22 21:10:19 +0200 | [diff] [blame] | 239 | ABORT_ON(parse_events_add_pmu(data, list, "cpu", head)); |
Arnaldo Carvalho de Melo | 2146afc | 2016-02-12 17:09:17 -0300 | [diff] [blame] | 240 | parse_events_terms__delete(head); |
Kan Liang | ba32a45 | 2014-10-07 11:08:51 -0400 | [diff] [blame] | 241 | $$ = list; |
| 242 | } |
| 243 | | |
| 244 | PE_PMU_EVENT_PRE '-' PE_PMU_EVENT_SUF sep_dc |
| 245 | { |
| 246 | struct parse_events_evlist *data = _data; |
| 247 | struct list_head *head; |
| 248 | struct parse_events_term *term; |
| 249 | struct list_head *list; |
| 250 | char pmu_name[128]; |
| 251 | snprintf(&pmu_name, 128, "%s-%s", $1, $3); |
| 252 | |
| 253 | ALLOC_LIST(head); |
| 254 | ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER, |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 255 | &pmu_name, 1, &@1, NULL)); |
Kan Liang | ba32a45 | 2014-10-07 11:08:51 -0400 | [diff] [blame] | 256 | list_add_tail(&term->list, head); |
| 257 | |
| 258 | ALLOC_LIST(list); |
Jiri Olsa | 5ad4da4 | 2015-09-02 09:56:31 +0200 | [diff] [blame] | 259 | ABORT_ON(parse_events_add_pmu(data, list, "cpu", head)); |
Arnaldo Carvalho de Melo | 2146afc | 2016-02-12 17:09:17 -0300 | [diff] [blame] | 260 | parse_events_terms__delete(head); |
Kan Liang | ba32a45 | 2014-10-07 11:08:51 -0400 | [diff] [blame] | 261 | $$ = list; |
| 262 | } |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 263 | |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 264 | value_sym: |
| 265 | PE_VALUE_SYM_HW |
| 266 | | |
| 267 | PE_VALUE_SYM_SW |
| 268 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 269 | event_legacy_symbol: |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 270 | value_sym '/' event_config '/' |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 271 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 272 | struct parse_events_evlist *data = _data; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 273 | struct list_head *list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 274 | int type = $1 >> 16; |
| 275 | int config = $1 & 255; |
| 276 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 277 | ALLOC_LIST(list); |
Jiri Olsa | 87d650b | 2015-04-22 21:10:24 +0200 | [diff] [blame] | 278 | ABORT_ON(parse_events_add_numeric(data, list, type, config, $3)); |
Arnaldo Carvalho de Melo | 2146afc | 2016-02-12 17:09:17 -0300 | [diff] [blame] | 279 | parse_events_terms__delete($3); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 280 | $$ = list; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 281 | } |
| 282 | | |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 283 | value_sym sep_slash_dc |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 284 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 285 | struct parse_events_evlist *data = _data; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 286 | struct list_head *list; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 287 | int type = $1 >> 16; |
| 288 | int config = $1 & 255; |
| 289 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 290 | ALLOC_LIST(list); |
Jiri Olsa | 87d650b | 2015-04-22 21:10:24 +0200 | [diff] [blame] | 291 | ABORT_ON(parse_events_add_numeric(data, list, type, config, NULL)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 292 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | event_legacy_cache: |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 296 | PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT '-' PE_NAME_CACHE_OP_RESULT opt_event_config |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 297 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 298 | struct parse_events_evlist *data = _data; |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 299 | struct parse_events_error *error = data->error; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 300 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 301 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 302 | ALLOC_LIST(list); |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 303 | ABORT_ON(parse_events_add_cache(list, &data->idx, $1, $3, $5, error, $6)); |
| 304 | parse_events_terms__delete($6); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 305 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 306 | } |
| 307 | | |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 308 | PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT opt_event_config |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 309 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 310 | struct parse_events_evlist *data = _data; |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 311 | struct parse_events_error *error = data->error; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 312 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 313 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 314 | ALLOC_LIST(list); |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 315 | ABORT_ON(parse_events_add_cache(list, &data->idx, $1, $3, NULL, error, $4)); |
| 316 | parse_events_terms__delete($4); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 317 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 318 | } |
| 319 | | |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 320 | PE_NAME_CACHE_TYPE opt_event_config |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 321 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 322 | struct parse_events_evlist *data = _data; |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 323 | struct parse_events_error *error = data->error; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 324 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 325 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 326 | ALLOC_LIST(list); |
Wang Nan | 43d0b97 | 2016-02-19 11:44:01 +0000 | [diff] [blame^] | 327 | ABORT_ON(parse_events_add_cache(list, &data->idx, $1, NULL, NULL, error, $2)); |
| 328 | parse_events_terms__delete($2); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 329 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 330 | } |
| 331 | |
| 332 | event_legacy_mem: |
Jacob Shin | 3741eb9 | 2014-05-29 17:26:51 +0200 | [diff] [blame] | 333 | PE_PREFIX_MEM PE_VALUE '/' PE_VALUE ':' PE_MODIFIER_BP sep_dc |
| 334 | { |
| 335 | struct parse_events_evlist *data = _data; |
| 336 | struct list_head *list; |
| 337 | |
| 338 | ALLOC_LIST(list); |
| 339 | ABORT_ON(parse_events_add_breakpoint(list, &data->idx, |
| 340 | (void *) $2, $6, $4)); |
| 341 | $$ = list; |
| 342 | } |
| 343 | | |
| 344 | PE_PREFIX_MEM PE_VALUE '/' PE_VALUE sep_dc |
| 345 | { |
| 346 | struct parse_events_evlist *data = _data; |
| 347 | struct list_head *list; |
| 348 | |
| 349 | ALLOC_LIST(list); |
| 350 | ABORT_ON(parse_events_add_breakpoint(list, &data->idx, |
| 351 | (void *) $2, NULL, $4)); |
| 352 | $$ = list; |
| 353 | } |
| 354 | | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 355 | PE_PREFIX_MEM PE_VALUE ':' PE_MODIFIER_BP sep_dc |
| 356 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 357 | struct parse_events_evlist *data = _data; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 358 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 359 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 360 | ALLOC_LIST(list); |
| 361 | ABORT_ON(parse_events_add_breakpoint(list, &data->idx, |
Jacob Shin | 3741eb9 | 2014-05-29 17:26:51 +0200 | [diff] [blame] | 362 | (void *) $2, $4, 0)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 363 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 364 | } |
| 365 | | |
| 366 | PE_PREFIX_MEM PE_VALUE sep_dc |
| 367 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 368 | struct parse_events_evlist *data = _data; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 369 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 370 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 371 | ALLOC_LIST(list); |
| 372 | ABORT_ON(parse_events_add_breakpoint(list, &data->idx, |
Jacob Shin | 3741eb9 | 2014-05-29 17:26:51 +0200 | [diff] [blame] | 373 | (void *) $2, NULL, 0)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 374 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 375 | } |
| 376 | |
| 377 | event_legacy_tracepoint: |
Arnaldo Carvalho de Melo | 1d55e8e | 2016-02-19 18:45:12 -0300 | [diff] [blame] | 378 | tracepoint_name opt_event_config |
Alexander Yarygin | 2b9032e | 2014-04-25 17:34:05 +0200 | [diff] [blame] | 379 | { |
| 380 | struct parse_events_evlist *data = _data; |
Jiri Olsa | 1965817 | 2015-09-07 10:38:07 +0200 | [diff] [blame] | 381 | struct parse_events_error *error = data->error; |
Alexander Yarygin | 2b9032e | 2014-04-25 17:34:05 +0200 | [diff] [blame] | 382 | struct list_head *list; |
Alexander Yarygin | 2b9032e | 2014-04-25 17:34:05 +0200 | [diff] [blame] | 383 | |
| 384 | ALLOC_LIST(list); |
He Kuang | e637d17 | 2015-09-28 03:52:16 +0000 | [diff] [blame] | 385 | if (error) |
| 386 | error->idx = @1.first_column; |
| 387 | |
He Kuang | 865582c | 2015-09-28 03:52:15 +0000 | [diff] [blame] | 388 | if (parse_events_add_tracepoint(list, &data->idx, $1.sys, $1.event, |
Arnaldo Carvalho de Melo | 1d55e8e | 2016-02-19 18:45:12 -0300 | [diff] [blame] | 389 | error, $2)) |
He Kuang | e637d17 | 2015-09-28 03:52:16 +0000 | [diff] [blame] | 390 | return -1; |
| 391 | |
Alexander Yarygin | 2b9032e | 2014-04-25 17:34:05 +0200 | [diff] [blame] | 392 | $$ = list; |
| 393 | } |
He Kuang | 865582c | 2015-09-28 03:52:15 +0000 | [diff] [blame] | 394 | |
| 395 | tracepoint_name: |
| 396 | PE_NAME '-' PE_NAME ':' PE_NAME |
| 397 | { |
| 398 | char sys_name[128]; |
| 399 | struct tracepoint_name tracepoint; |
| 400 | |
| 401 | snprintf(&sys_name, 128, "%s-%s", $1, $3); |
| 402 | tracepoint.sys = &sys_name; |
| 403 | tracepoint.event = $5; |
| 404 | |
| 405 | $$ = tracepoint; |
| 406 | } |
Alexander Yarygin | 2b9032e | 2014-04-25 17:34:05 +0200 | [diff] [blame] | 407 | | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 408 | PE_NAME ':' PE_NAME |
| 409 | { |
He Kuang | 865582c | 2015-09-28 03:52:15 +0000 | [diff] [blame] | 410 | struct tracepoint_name tracepoint = {$1, $3}; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 411 | |
He Kuang | 865582c | 2015-09-28 03:52:15 +0000 | [diff] [blame] | 412 | $$ = tracepoint; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 413 | } |
| 414 | |
| 415 | event_legacy_numeric: |
Wang Nan | 10bf358 | 2016-02-19 11:44:00 +0000 | [diff] [blame] | 416 | PE_VALUE ':' PE_VALUE opt_event_config |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 417 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 418 | struct parse_events_evlist *data = _data; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 419 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 420 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 421 | ALLOC_LIST(list); |
Wang Nan | 10bf358 | 2016-02-19 11:44:00 +0000 | [diff] [blame] | 422 | ABORT_ON(parse_events_add_numeric(data, list, (u32)$1, $3, $4)); |
| 423 | parse_events_terms__delete($4); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 424 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 425 | } |
| 426 | |
| 427 | event_legacy_raw: |
Wang Nan | 10bf358 | 2016-02-19 11:44:00 +0000 | [diff] [blame] | 428 | PE_RAW opt_event_config |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 429 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 430 | struct parse_events_evlist *data = _data; |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 431 | struct list_head *list; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 432 | |
David Ahern | c5cd8ac | 2013-07-02 13:27:25 -0600 | [diff] [blame] | 433 | ALLOC_LIST(list); |
Wang Nan | 10bf358 | 2016-02-19 11:44:00 +0000 | [diff] [blame] | 434 | ABORT_ON(parse_events_add_numeric(data, list, PERF_TYPE_RAW, $1, $2)); |
| 435 | parse_events_terms__delete($2); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 436 | $$ = list; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 437 | } |
| 438 | |
Wang Nan | 84c86ca | 2015-10-14 12:41:14 +0000 | [diff] [blame] | 439 | event_bpf_file: |
| 440 | PE_BPF_OBJECT |
| 441 | { |
| 442 | struct parse_events_evlist *data = _data; |
| 443 | struct parse_events_error *error = data->error; |
| 444 | struct list_head *list; |
| 445 | |
| 446 | ALLOC_LIST(list); |
Wang Nan | d509db0 | 2015-10-14 12:41:20 +0000 | [diff] [blame] | 447 | ABORT_ON(parse_events_load_bpf(data, list, $1, false)); |
| 448 | $$ = list; |
| 449 | } |
| 450 | | |
| 451 | PE_BPF_SOURCE |
| 452 | { |
| 453 | struct parse_events_evlist *data = _data; |
| 454 | struct list_head *list; |
| 455 | |
| 456 | ALLOC_LIST(list); |
| 457 | ABORT_ON(parse_events_load_bpf(data, list, $1, true)); |
Wang Nan | 84c86ca | 2015-10-14 12:41:14 +0000 | [diff] [blame] | 458 | $$ = list; |
| 459 | } |
| 460 | |
Arnaldo Carvalho de Melo | 1d55e8e | 2016-02-19 18:45:12 -0300 | [diff] [blame] | 461 | opt_event_config: |
| 462 | '/' event_config '/' |
| 463 | { |
| 464 | $$ = $2; |
| 465 | } |
| 466 | | |
| 467 | '/' '/' |
| 468 | { |
| 469 | $$ = NULL; |
| 470 | } |
| 471 | | |
| 472 | { |
| 473 | $$ = NULL; |
| 474 | } |
| 475 | |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame] | 476 | start_terms: event_config |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 477 | { |
Arnaldo Carvalho de Melo | 23b6339 | 2013-01-18 16:56:57 -0300 | [diff] [blame] | 478 | struct parse_events_terms *data = _data; |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 479 | data->terms = $1; |
| 480 | } |
| 481 | |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 482 | event_config: |
| 483 | event_config ',' event_term |
| 484 | { |
| 485 | struct list_head *head = $1; |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 486 | struct parse_events_term *term = $3; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 487 | |
| 488 | ABORT_ON(!head); |
| 489 | list_add_tail(&term->list, head); |
| 490 | $$ = $1; |
| 491 | } |
| 492 | | |
| 493 | event_term |
| 494 | { |
| 495 | struct list_head *head = malloc(sizeof(*head)); |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 496 | struct parse_events_term *term = $1; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 497 | |
| 498 | ABORT_ON(!head); |
| 499 | INIT_LIST_HEAD(head); |
| 500 | list_add_tail(&term->list, head); |
| 501 | $$ = head; |
| 502 | } |
| 503 | |
| 504 | event_term: |
| 505 | PE_NAME '=' PE_NAME |
| 506 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 507 | struct parse_events_term *term; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 508 | |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 509 | ABORT_ON(parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_USER, |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 510 | $1, $3, &@1, &@3)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 511 | $$ = term; |
| 512 | } |
| 513 | | |
| 514 | PE_NAME '=' PE_VALUE |
| 515 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 516 | struct parse_events_term *term; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 517 | |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 518 | ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER, |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 519 | $1, $3, &@1, &@3)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 520 | $$ = term; |
| 521 | } |
| 522 | | |
Jiri Olsa | 1d33d6d | 2012-10-10 14:53:17 +0200 | [diff] [blame] | 523 | PE_NAME '=' PE_VALUE_SYM_HW |
| 524 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 525 | struct parse_events_term *term; |
Jiri Olsa | 1d33d6d | 2012-10-10 14:53:17 +0200 | [diff] [blame] | 526 | int config = $3 & 255; |
| 527 | |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 528 | ABORT_ON(parse_events_term__sym_hw(&term, $1, config)); |
Jiri Olsa | 1d33d6d | 2012-10-10 14:53:17 +0200 | [diff] [blame] | 529 | $$ = term; |
| 530 | } |
| 531 | | |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 532 | PE_NAME |
| 533 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 534 | struct parse_events_term *term; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 535 | |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 536 | ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER, |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 537 | $1, 1, &@1, NULL)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 538 | $$ = term; |
| 539 | } |
| 540 | | |
Jiri Olsa | 1d33d6d | 2012-10-10 14:53:17 +0200 | [diff] [blame] | 541 | PE_VALUE_SYM_HW |
| 542 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 543 | struct parse_events_term *term; |
Jiri Olsa | 1d33d6d | 2012-10-10 14:53:17 +0200 | [diff] [blame] | 544 | int config = $1 & 255; |
| 545 | |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 546 | ABORT_ON(parse_events_term__sym_hw(&term, NULL, config)); |
Jiri Olsa | 1d33d6d | 2012-10-10 14:53:17 +0200 | [diff] [blame] | 547 | $$ = term; |
| 548 | } |
| 549 | | |
Jiri Olsa | 6b5fc39 | 2012-05-21 09:12:53 +0200 | [diff] [blame] | 550 | PE_TERM '=' PE_NAME |
| 551 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 552 | struct parse_events_term *term; |
Jiri Olsa | 6b5fc39 | 2012-05-21 09:12:53 +0200 | [diff] [blame] | 553 | |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 554 | ABORT_ON(parse_events_term__str(&term, (int)$1, NULL, $3, &@1, &@3)); |
Jiri Olsa | 6b5fc39 | 2012-05-21 09:12:53 +0200 | [diff] [blame] | 555 | $$ = term; |
| 556 | } |
| 557 | | |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 558 | PE_TERM '=' PE_VALUE |
| 559 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 560 | struct parse_events_term *term; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 561 | |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 562 | ABORT_ON(parse_events_term__num(&term, (int)$1, NULL, $3, &@1, &@3)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 563 | $$ = term; |
| 564 | } |
| 565 | | |
| 566 | PE_TERM |
| 567 | { |
Arnaldo Carvalho de Melo | 6cee6cd | 2013-01-18 16:29:49 -0300 | [diff] [blame] | 568 | struct parse_events_term *term; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 569 | |
Jiri Olsa | cecf3a2e | 2015-04-22 21:10:20 +0200 | [diff] [blame] | 570 | ABORT_ON(parse_events_term__num(&term, (int)$1, NULL, 1, &@1, NULL)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 571 | $$ = term; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 572 | } |
| 573 | |
| 574 | sep_dc: ':' | |
| 575 | |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 576 | sep_slash_dc: '/' | ':' | |
| 577 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 578 | %% |
| 579 | |
Jiri Olsa | 6297d42 | 2015-04-22 21:10:17 +0200 | [diff] [blame] | 580 | void parse_events_error(YYLTYPE *loc, void *data, |
| 581 | void *scanner __maybe_unused, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 582 | char const *msg __maybe_unused) |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 583 | { |
Jiri Olsa | 6297d42 | 2015-04-22 21:10:17 +0200 | [diff] [blame] | 584 | parse_events_evlist_error(data, loc->last_column, "parser error"); |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 585 | } |