aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events-bison.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/parse-events-bison.c')
-rw-r--r--tools/perf/util/parse-events-bison.c310
1 files changed, 217 insertions, 93 deletions
diff --git a/tools/perf/util/parse-events-bison.c b/tools/perf/util/parse-events-bison.c
index 20fca2635664..ace593a25182 100644
--- a/tools/perf/util/parse-events-bison.c
+++ b/tools/perf/util/parse-events-bison.c
@@ -127,14 +127,15 @@ do { \
127 PE_VALUE = 258, 127 PE_VALUE = 258,
128 PE_VALUE_SYM = 259, 128 PE_VALUE_SYM = 259,
129 PE_RAW = 260, 129 PE_RAW = 260,
130 PE_NAME = 261, 130 PE_TERM = 261,
131 PE_MODIFIER_EVENT = 262, 131 PE_NAME = 262,
132 PE_MODIFIER_BP = 263, 132 PE_MODIFIER_EVENT = 263,
133 PE_NAME_CACHE_TYPE = 264, 133 PE_MODIFIER_BP = 264,
134 PE_NAME_CACHE_OP_RESULT = 265, 134 PE_NAME_CACHE_TYPE = 265,
135 PE_PREFIX_MEM = 266, 135 PE_NAME_CACHE_OP_RESULT = 266,
136 PE_PREFIX_RAW = 267, 136 PE_PREFIX_MEM = 267,
137 PE_ERROR = 268 137 PE_PREFIX_RAW = 268,
138 PE_ERROR = 269
138 }; 139 };
139#endif 140#endif
140 141
@@ -145,15 +146,17 @@ typedef union YYSTYPE
145{ 146{
146 147
147/* Line 214 of yacc.c */ 148/* Line 214 of yacc.c */
148#line 42 "util/parse-events.y" 149#line 45 "util/parse-events.y"
149 150
150 char *str; 151 char *str;
151 unsigned long num; 152 unsigned long num;
153 struct list_head *head;
154 struct parse_events__term *term;
152 155
153 156
154 157
155/* Line 214 of yacc.c */ 158/* Line 214 of yacc.c */
156#line 157 "util/parse-events-bison.c" 159#line 160 "util/parse-events-bison.c"
157} YYSTYPE; 160} YYSTYPE;
158# define YYSTYPE_IS_TRIVIAL 1 161# define YYSTYPE_IS_TRIVIAL 1
159# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 162# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -165,7 +168,7 @@ typedef union YYSTYPE
165 168
166 169
167/* Line 264 of yacc.c */ 170/* Line 264 of yacc.c */
168#line 169 "util/parse-events-bison.c" 171#line 172 "util/parse-events-bison.c"
169 172
170#ifdef short 173#ifdef short
171# undef short 174# undef short
@@ -378,22 +381,22 @@ union yyalloc
378#endif 381#endif
379 382
380/* YYFINAL -- State number of the termination state. */ 383/* YYFINAL -- State number of the termination state. */
381#define YYFINAL 20 384#define YYFINAL 23
382/* YYLAST -- Last index in YYTABLE. */ 385/* YYLAST -- Last index in YYTABLE. */
383#define YYLAST 27 386#define YYLAST 38
384 387
385/* YYNTOKENS -- Number of terminals. */ 388/* YYNTOKENS -- Number of terminals. */
386#define YYNTOKENS 17 389#define YYNTOKENS 20
387/* YYNNTS -- Number of nonterminals. */ 390/* YYNNTS -- Number of nonterminals. */
388#define YYNNTS 11 391#define YYNNTS 14
389/* YYNRULES -- Number of rules. */ 392/* YYNRULES -- Number of rules. */
390#define YYNRULES 22 393#define YYNRULES 33
391/* YYNRULES -- Number of states. */ 394/* YYNRULES -- Number of states. */
392#define YYNSTATES 39 395#define YYNSTATES 53
393 396
394/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 397/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
395#define YYUNDEFTOK 2 398#define YYUNDEFTOK 2
396#define YYMAXUTOK 268 399#define YYMAXUTOK 269
397 400
398#define YYTRANSLATE(YYX) \ 401#define YYTRANSLATE(YYX) \
399 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 402 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -405,9 +408,9 @@ static const yytype_uint8 yytranslate[] =
405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
408 2, 2, 2, 2, 14, 15, 2, 2, 2, 2, 411 2, 2, 2, 2, 15, 17, 2, 16, 2, 2,
409 2, 2, 2, 2, 2, 2, 2, 2, 16, 2, 412 2, 2, 2, 2, 2, 2, 2, 2, 18, 2,
410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 413 2, 19, 2, 2, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -427,7 +430,7 @@ static const yytype_uint8 yytranslate[] =
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 432 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
430 5, 6, 7, 8, 9, 10, 11, 12, 13 433 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
431}; 434};
432 435
433#if YYDEBUG 436#if YYDEBUG
@@ -435,29 +438,34 @@ static const yytype_uint8 yytranslate[] =
435 YYRHS. */ 438 YYRHS. */
436static const yytype_uint8 yyprhs[] = 439static const yytype_uint8 yyprhs[] =
437{ 440{
438 0, 0, 3, 7, 9, 12, 14, 17, 20, 22, 441 0, 0, 3, 7, 9, 12, 14, 16, 19, 21,
439 25, 28, 31, 33, 39, 43, 45, 51, 55, 59, 442 24, 27, 30, 35, 38, 44, 48, 50, 56, 60,
440 63, 65, 67 443 64, 68, 70, 74, 76, 80, 84, 86, 90, 92,
444 94, 95, 97, 99
441}; 445};
442 446
443/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 447/* YYRHS -- A `-1'-separated list of the rules' RHS. */
444static const yytype_int8 yyrhs[] = 448static const yytype_int8 yyrhs[] =
445{ 449{
446 18, 0, -1, 18, 14, 19, -1, 19, -1, 20, 450 21, 0, -1, 21, 15, 22, -1, 22, -1, 23,
447 7, -1, 20, -1, 21, 27, -1, 22, 27, -1, 451 8, -1, 23, -1, 24, -1, 25, 32, -1, 26,
448 23, -1, 24, 27, -1, 25, 27, -1, 26, 27, 452 -1, 27, 32, -1, 28, 32, -1, 29, 32, -1,
449 -1, 4, -1, 9, 15, 10, 15, 10, -1, 9, 453 4, 16, 30, 16, -1, 4, 33, -1, 10, 17,
450 15, 10, -1, 9, -1, 11, 3, 16, 8, 27, 454 11, 17, 11, -1, 10, 17, 11, -1, 10, -1,
451 -1, 11, 3, 27, -1, 6, 16, 6, -1, 3, 455 12, 3, 18, 9, 32, -1, 12, 3, 32, -1,
452 16, 3, -1, 5, -1, 16, -1, -1 456 7, 18, 7, -1, 3, 18, 3, -1, 5, -1,
457 30, 15, 31, -1, 31, -1, 7, 19, 7, -1,
458 7, 19, 3, -1, 7, -1, 6, 19, 3, -1,
459 6, -1, 18, -1, -1, 16, -1, 18, -1, -1
453}; 460};
454 461
455/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 462/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
456static const yytype_uint8 yyrline[] = 463static const yytype_uint8 yyrline[] =
457{ 464{
458 0, 49, 49, 49, 52, 57, 59, 60, 61, 62, 465 0, 54, 54, 54, 57, 62, 64, 65, 66, 67,
459 63, 64, 67, 76, 81, 86, 92, 97, 103, 109, 466 68, 69, 72, 81, 90, 95, 100, 106, 111, 117,
460 115, 120, 120 467 123, 129, 135, 145, 157, 166, 175, 184, 192, 200,
468 200, 202, 202, 202
461}; 469};
462#endif 470#endif
463 471
@@ -467,12 +475,13 @@ static const yytype_uint8 yyrline[] =
467static const char *const yytname[] = 475static const char *const yytname[] =
468{ 476{
469 "$end", "error", "$undefined", "PE_VALUE", "PE_VALUE_SYM", "PE_RAW", 477 "$end", "error", "$undefined", "PE_VALUE", "PE_VALUE_SYM", "PE_RAW",
470 "PE_NAME", "PE_MODIFIER_EVENT", "PE_MODIFIER_BP", "PE_NAME_CACHE_TYPE", 478 "PE_TERM", "PE_NAME", "PE_MODIFIER_EVENT", "PE_MODIFIER_BP",
471 "PE_NAME_CACHE_OP_RESULT", "PE_PREFIX_MEM", "PE_PREFIX_RAW", "PE_ERROR", 479 "PE_NAME_CACHE_TYPE", "PE_NAME_CACHE_OP_RESULT", "PE_PREFIX_MEM",
472 "','", "'-'", "':'", "$accept", "events", "event", "event_def", 480 "PE_PREFIX_RAW", "PE_ERROR", "','", "'/'", "'-'", "':'", "'='",
473 "event_legacy_symbol", "event_legacy_cache", "event_legacy_mem", 481 "$accept", "events", "event", "event_def", "event_legacy_symbol",
474 "event_legacy_tracepoint", "event_legacy_numeric", "event_legacy_raw", 482 "event_legacy_cache", "event_legacy_mem", "event_legacy_tracepoint",
475 "sep_dc", 0 483 "event_legacy_numeric", "event_legacy_raw", "event_config", "event_term",
484 "sep_dc", "sep_slash_dc", 0
476}; 485};
477#endif 486#endif
478 487
@@ -482,24 +491,26 @@ static const char *const yytname[] =
482static const yytype_uint16 yytoknum[] = 491static const yytype_uint16 yytoknum[] =
483{ 492{
484 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 493 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
485 265, 266, 267, 268, 44, 45, 58 494 265, 266, 267, 268, 269, 44, 47, 45, 58, 61
486}; 495};
487# endif 496# endif
488 497
489/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 498/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
490static const yytype_uint8 yyr1[] = 499static const yytype_uint8 yyr1[] =
491{ 500{
492 0, 17, 18, 18, 19, 19, 20, 20, 20, 20, 501 0, 20, 21, 21, 22, 22, 23, 23, 23, 23,
493 20, 20, 21, 22, 22, 22, 23, 23, 24, 25, 502 23, 23, 24, 24, 25, 25, 25, 26, 26, 27,
494 26, 27, 27 503 28, 29, 30, 30, 31, 31, 31, 31, 31, 32,
504 32, 33, 33, 33
495}; 505};
496 506
497/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 507/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
498static const yytype_uint8 yyr2[] = 508static const yytype_uint8 yyr2[] =
499{ 509{
500 0, 2, 3, 1, 2, 1, 2, 2, 1, 2, 510 0, 2, 3, 1, 2, 1, 1, 2, 1, 2,
501 2, 2, 1, 5, 3, 1, 5, 3, 3, 3, 511 2, 2, 4, 2, 5, 3, 1, 5, 3, 3,
502 1, 1, 0 512 3, 1, 3, 1, 3, 3, 1, 3, 1, 1,
513 0, 1, 1, 0
503}; 514};
504 515
505/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 516/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -507,35 +518,39 @@ static const yytype_uint8 yyr2[] =
507 means the default is an error. */ 518 means the default is an error. */
508static const yytype_uint8 yydefact[] = 519static const yytype_uint8 yydefact[] =
509{ 520{
510 0, 0, 12, 20, 0, 15, 0, 0, 3, 5, 521 0, 0, 33, 21, 0, 16, 0, 0, 3, 5,
511 22, 22, 8, 22, 22, 22, 0, 0, 0, 22, 522 6, 30, 8, 30, 30, 30, 0, 31, 32, 13,
512 1, 0, 4, 21, 6, 7, 9, 10, 11, 19, 523 0, 0, 30, 1, 0, 4, 29, 7, 9, 10,
513 18, 14, 21, 17, 2, 0, 22, 13, 16 524 11, 20, 28, 26, 0, 23, 19, 15, 29, 18,
525 2, 0, 0, 0, 12, 0, 30, 27, 25, 24,
526 22, 14, 17
514}; 527};
515 528
516/* YYDEFGOTO[NTERM-NUM]. */ 529/* YYDEFGOTO[NTERM-NUM]. */
517static const yytype_int8 yydefgoto[] = 530static const yytype_int8 yydefgoto[] =
518{ 531{
519 -1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 532 -1, 7, 8, 9, 10, 11, 12, 13, 14, 15,
520 24 533 34, 35, 27, 19
521}; 534};
522 535
523/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 536/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
524 STATE-NUM. */ 537 STATE-NUM. */
525#define YYPACT_NINF -12 538#define YYPACT_NINF -14
526static const yytype_int8 yypact[] = 539static const yytype_int8 yypact[] =
527{ 540{
528 7, -10, -12, -12, -9, -6, 2, 1, -12, 10, 541 1, -11, -1, -14, -6, 8, 20, 3, -14, 16,
529 -2, -2, -12, -2, -2, -2, 16, 14, 11, 6, 542 -14, -2, -14, -2, -2, -2, 23, 13, -14, -14,
530 -12, 7, -12, -12, -12, -12, -12, -12, -12, -12, 543 21, 18, 9, -14, 1, -14, -14, -14, -14, -14,
531 -12, 8, 18, -12, -12, 17, -2, -12, -12 544 -14, -14, 11, 12, 6, -14, -14, 15, 25, -14,
545 -14, 32, 7, 13, -14, 26, -2, -14, -14, -14,
546 -14, -14, -14
532}; 547};
533 548
534/* YYPGOTO[NTERM-NUM]. */ 549/* YYPGOTO[NTERM-NUM]. */
535static const yytype_int8 yypgoto[] = 550static const yytype_int8 yypgoto[] =
536{ 551{
537 -12, -12, 3, -12, -12, -12, -12, -12, -12, -12, 552 -14, -14, 14, -14, -14, -14, -14, -14, -14, -14,
538 -11 553 -14, -7, -13, -14
539}; 554};
540 555
541/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 556/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -545,26 +560,30 @@ static const yytype_int8 yypgoto[] =
545#define YYTABLE_NINF -1 560#define YYTABLE_NINF -1
546static const yytype_uint8 yytable[] = 561static const yytype_uint8 yytable[] =
547{ 562{
548 25, 20, 26, 27, 28, 19, 16, 17, 33, 18, 563 28, 29, 30, 23, 1, 2, 3, 16, 4, 39,
549 1, 2, 3, 4, 23, 21, 5, 22, 6, 29, 564 48, 5, 20, 6, 49, 17, 26, 18, 24, 32,
550 30, 31, 32, 35, 34, 38, 36, 37 565 33, 43, 44, 22, 25, 21, 31, 38, 36, 37,
566 41, 42, 45, 52, 46, 47, 50, 51, 40
551}; 567};
552 568
553static const yytype_uint8 yycheck[] = 569static const yytype_uint8 yycheck[] =
554{ 570{
555 11, 0, 13, 14, 15, 3, 16, 16, 19, 15, 571 13, 14, 15, 0, 3, 4, 5, 18, 7, 22,
556 3, 4, 5, 6, 16, 14, 9, 7, 11, 3, 572 3, 10, 18, 12, 7, 16, 18, 18, 15, 6,
557 6, 10, 16, 15, 21, 36, 8, 10 573 7, 15, 16, 3, 8, 17, 3, 18, 7, 11,
574 19, 19, 17, 46, 9, 3, 43, 11, 24
558}; 575};
559 576
560/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 577/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
561 symbol of state STATE-NUM. */ 578 symbol of state STATE-NUM. */
562static const yytype_uint8 yystos[] = 579static const yytype_uint8 yystos[] =
563{ 580{
564 0, 3, 4, 5, 6, 9, 11, 18, 19, 20, 581 0, 3, 4, 5, 7, 10, 12, 21, 22, 23,
565 21, 22, 23, 24, 25, 26, 16, 16, 15, 3, 582 24, 25, 26, 27, 28, 29, 18, 16, 18, 33,
566 0, 14, 7, 16, 27, 27, 27, 27, 27, 3, 583 18, 17, 3, 0, 15, 8, 18, 32, 32, 32,
567 6, 10, 16, 27, 19, 15, 8, 10, 27 584 32, 3, 6, 7, 30, 31, 7, 11, 18, 32,
585 22, 19, 19, 15, 16, 17, 9, 3, 3, 7,
586 31, 11, 32
568}; 587};
569 588
570#define yyerrok (yyerrstatus = 0) 589#define yyerrok (yyerrstatus = 0)
@@ -1400,7 +1419,7 @@ yyreduce:
1400 case 4: 1419 case 4:
1401 1420
1402/* Line 1464 of yacc.c */ 1421/* Line 1464 of yacc.c */
1403#line 53 "util/parse-events.y" 1422#line 58 "util/parse-events.y"
1404 { 1423 {
1405 ABORT_ON(parse_events_modifier(list, (yyvsp[(2) - (2)].str))); 1424 ABORT_ON(parse_events_modifier(list, (yyvsp[(2) - (2)].str)));
1406;} 1425;}
@@ -1409,91 +1428,196 @@ yyreduce:
1409 case 12: 1428 case 12:
1410 1429
1411/* Line 1464 of yacc.c */ 1430/* Line 1464 of yacc.c */
1412#line 68 "util/parse-events.y" 1431#line 73 "util/parse-events.y"
1413 { 1432 {
1414 int type = (yyvsp[(1) - (1)].num) >> 16; 1433 int type = (yyvsp[(1) - (4)].num) >> 16;
1415 int config = (yyvsp[(1) - (1)].num) & 255; 1434 int config = (yyvsp[(1) - (4)].num) & 255;
1416 1435
1417 ABORT_ON(parse_events_add_numeric(list, idx, type, config)); 1436 ABORT_ON(parse_events_add_numeric(list, idx, type, config, (yyvsp[(3) - (4)].head)));
1437 parse_events__free_terms((yyvsp[(3) - (4)].head));
1418;} 1438;}
1419 break; 1439 break;
1420 1440
1421 case 13: 1441 case 13:
1422 1442
1423/* Line 1464 of yacc.c */ 1443/* Line 1464 of yacc.c */
1424#line 77 "util/parse-events.y" 1444#line 82 "util/parse-events.y"
1425 { 1445 {
1426 ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str))); 1446 int type = (yyvsp[(1) - (2)].num) >> 16;
1447 int config = (yyvsp[(1) - (2)].num) & 255;
1448
1449 ABORT_ON(parse_events_add_numeric(list, idx, type, config, NULL));
1427;} 1450;}
1428 break; 1451 break;
1429 1452
1430 case 14: 1453 case 14:
1431 1454
1432/* Line 1464 of yacc.c */ 1455/* Line 1464 of yacc.c */
1433#line 82 "util/parse-events.y" 1456#line 91 "util/parse-events.y"
1434 { 1457 {
1435 ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str), NULL)); 1458 ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str)));
1436;} 1459;}
1437 break; 1460 break;
1438 1461
1439 case 15: 1462 case 15:
1440 1463
1441/* Line 1464 of yacc.c */ 1464/* Line 1464 of yacc.c */
1442#line 87 "util/parse-events.y" 1465#line 96 "util/parse-events.y"
1443 { 1466 {
1444 ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (1)].str), NULL, NULL)); 1467 ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str), NULL));
1445;} 1468;}
1446 break; 1469 break;
1447 1470
1448 case 16: 1471 case 16:
1449 1472
1450/* Line 1464 of yacc.c */ 1473/* Line 1464 of yacc.c */
1451#line 93 "util/parse-events.y" 1474#line 101 "util/parse-events.y"
1452 { 1475 {
1453 ABORT_ON(parse_events_add_breakpoint(list, idx, (void *) (yyvsp[(2) - (5)].num), (yyvsp[(4) - (5)].str))); 1476 ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (1)].str), NULL, NULL));
1454;} 1477;}
1455 break; 1478 break;
1456 1479
1457 case 17: 1480 case 17:
1458 1481
1459/* Line 1464 of yacc.c */ 1482/* Line 1464 of yacc.c */
1460#line 98 "util/parse-events.y" 1483#line 107 "util/parse-events.y"
1461 { 1484 {
1462 ABORT_ON(parse_events_add_breakpoint(list, idx, (void *) (yyvsp[(2) - (3)].num), NULL)); 1485 ABORT_ON(parse_events_add_breakpoint(list, idx, (void *) (yyvsp[(2) - (5)].num), (yyvsp[(4) - (5)].str)));
1463;} 1486;}
1464 break; 1487 break;
1465 1488
1466 case 18: 1489 case 18:
1467 1490
1468/* Line 1464 of yacc.c */ 1491/* Line 1464 of yacc.c */
1469#line 104 "util/parse-events.y" 1492#line 112 "util/parse-events.y"
1470 { 1493 {
1471 ABORT_ON(parse_events_add_tracepoint(list, idx, (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str))); 1494 ABORT_ON(parse_events_add_breakpoint(list, idx, (void *) (yyvsp[(2) - (3)].num), NULL));
1472;} 1495;}
1473 break; 1496 break;
1474 1497
1475 case 19: 1498 case 19:
1476 1499
1477/* Line 1464 of yacc.c */ 1500/* Line 1464 of yacc.c */
1478#line 110 "util/parse-events.y" 1501#line 118 "util/parse-events.y"
1479 { 1502 {
1480 ABORT_ON(parse_events_add_numeric(list, idx, (yyvsp[(1) - (3)].num), (yyvsp[(3) - (3)].num))); 1503 ABORT_ON(parse_events_add_tracepoint(list, idx, (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)));
1481;} 1504;}
1482 break; 1505 break;
1483 1506
1484 case 20: 1507 case 20:
1485 1508
1486/* Line 1464 of yacc.c */ 1509/* Line 1464 of yacc.c */
1487#line 116 "util/parse-events.y" 1510#line 124 "util/parse-events.y"
1511 {
1512 ABORT_ON(parse_events_add_numeric(list, idx, (yyvsp[(1) - (3)].num), (yyvsp[(3) - (3)].num), NULL));
1513;}
1514 break;
1515
1516 case 21:
1517
1518/* Line 1464 of yacc.c */
1519#line 130 "util/parse-events.y"
1520 {
1521 ABORT_ON(parse_events_add_numeric(list, idx, PERF_TYPE_RAW, (yyvsp[(1) - (1)].num), NULL));
1522;}
1523 break;
1524
1525 case 22:
1526
1527/* Line 1464 of yacc.c */
1528#line 136 "util/parse-events.y"
1488 { 1529 {
1489 ABORT_ON(parse_events_add_numeric(list, idx, PERF_TYPE_RAW, (yyvsp[(1) - (1)].num))); 1530 struct list_head *head = (yyvsp[(1) - (3)].head);
1531 struct parse_events__term *term = (yyvsp[(3) - (3)].term);
1532
1533 ABORT_ON(!head);
1534 list_add_tail(&term->list, head);
1535 (yyval.head) = (yyvsp[(1) - (3)].head);
1536;}
1537 break;
1538
1539 case 23:
1540
1541/* Line 1464 of yacc.c */
1542#line 146 "util/parse-events.y"
1543 {
1544 struct list_head *head = malloc(sizeof(*head));
1545 struct parse_events__term *term = (yyvsp[(1) - (1)].term);
1546
1547 ABORT_ON(!head);
1548 INIT_LIST_HEAD(head);
1549 list_add_tail(&term->list, head);
1550 (yyval.head) = head;
1551;}
1552 break;
1553
1554 case 24:
1555
1556/* Line 1464 of yacc.c */
1557#line 158 "util/parse-events.y"
1558 {
1559 struct parse_events__term *term;
1560
1561 ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_STR,
1562 (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str), 0));
1563 (yyval.term) = term;
1564;}
1565 break;
1566
1567 case 25:
1568
1569/* Line 1464 of yacc.c */
1570#line 167 "util/parse-events.y"
1571 {
1572 struct parse_events__term *term;
1573
1574 ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_NUM,
1575 (yyvsp[(1) - (3)].str), NULL, (yyvsp[(3) - (3)].num)));
1576 (yyval.term) = term;
1577;}
1578 break;
1579
1580 case 26:
1581
1582/* Line 1464 of yacc.c */
1583#line 176 "util/parse-events.y"
1584 {
1585 struct parse_events__term *term;
1586
1587 ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_NUM,
1588 (yyvsp[(1) - (1)].str), NULL, 1));
1589 (yyval.term) = term;
1590;}
1591 break;
1592
1593 case 27:
1594
1595/* Line 1464 of yacc.c */
1596#line 185 "util/parse-events.y"
1597 {
1598 struct parse_events__term *term;
1599
1600 ABORT_ON(parse_events__new_term(&term, (yyvsp[(1) - (3)].num), NULL, NULL, (yyvsp[(3) - (3)].num)));
1601 (yyval.term) = term;
1602;}
1603 break;
1604
1605 case 28:
1606
1607/* Line 1464 of yacc.c */
1608#line 193 "util/parse-events.y"
1609 {
1610 struct parse_events__term *term;
1611
1612 ABORT_ON(parse_events__new_term(&term, (yyvsp[(1) - (1)].num), NULL, NULL, 1));
1613 (yyval.term) = term;
1490;} 1614;}
1491 break; 1615 break;
1492 1616
1493 1617
1494 1618
1495/* Line 1464 of yacc.c */ 1619/* Line 1464 of yacc.c */
1496#line 1497 "util/parse-events-bison.c" 1620#line 1621 "util/parse-events-bison.c"
1497 default: break; 1621 default: break;
1498 } 1622 }
1499 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1623 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1705,7 +1829,7 @@ yyreturn:
1705 1829
1706 1830
1707/* Line 1684 of yacc.c */ 1831/* Line 1684 of yacc.c */
1708#line 122 "util/parse-events.y" 1832#line 204 "util/parse-events.y"
1709 1833
1710 1834
1711void parse_events_error(struct list_head *list __used, int *idx __used, 1835void parse_events_error(struct list_head *list __used, int *idx __used,