47 #define YYBISON_VERSION "3.0.4" 50 #define YYSKELETON_NAME "yacc.c" 63 #define yyparse parse_events_parse 64 #define yylex parse_events_lex 65 #define yyerror parse_events_error 66 #define yydebug parse_events_debug 67 #define yynerrs parse_events_nerrs 71 #line 7 "util/parse-events.y" 76 #include <linux/compiler.h> 77 #include <linux/list.h> 78 #include <linux/types.h> 87 #define ABORT_ON(val) \ 93 #define ALLOC_LIST(list) \ 95 list = malloc(sizeof(*list)); \ 97 INIT_LIST_HEAD(list); \ 101 struct parse_events_evlist *
data)
104 if (!list_is_last(list->next, list))
109 #line 110 "util/parse-events-bison.c" 112 # if defined __cplusplus && 201103L <= __cplusplus 113 # define YY_NULLPTR nullptr 115 # define YY_NULLPTR 0 120 #ifdef YYERROR_VERBOSE 121 # undef YYERROR_VERBOSE 122 # define YYERROR_VERBOSE 1 124 # define YYERROR_VERBOSE 0 129 #ifndef YY_PARSE_EVENTS_UTIL_PARSE_EVENTS_BISON_H_INCLUDED 130 # define YY_PARSE_EVENTS_UTIL_PARSE_EVENTS_BISON_H_INCLUDED 136 extern int parse_events_debug;
173 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 177 #line 98 "util/parse-events.y" 181 struct list_head *
head;
189 #line 190 "util/parse-events-bison.c" 193 # define YYSTYPE_IS_TRIVIAL 1 194 # define YYSTYPE_IS_DECLARED 1 198 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 199 typedef struct YYLTYPE YYLTYPE;
207 # define YYLTYPE_IS_DECLARED 1 208 # define YYLTYPE_IS_TRIVIAL 1 219 #line 220 "util/parse-events-bison.c" 250 # ifdef __SIZE_TYPE__ 251 # define YYSIZE_T __SIZE_TYPE__ 252 # elif defined size_t 253 # define YYSIZE_T size_t 254 # elif ! defined YYSIZE_T 256 # define YYSIZE_T size_t 258 # define YYSIZE_T unsigned int 262 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 265 # if defined YYENABLE_NLS && YYENABLE_NLS 267 # include <libintl.h> 268 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 272 # define YY_(Msgid) Msgid 277 # if (defined __GNUC__ \ 278 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 279 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 280 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 282 # define YY_ATTRIBUTE(Spec) 286 #ifndef YY_ATTRIBUTE_PURE 287 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 290 #ifndef YY_ATTRIBUTE_UNUSED 291 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 294 #if !defined _Noreturn \ 295 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 296 # if defined _MSC_VER && 1200 <= _MSC_VER 297 # define _Noreturn __declspec (noreturn) 299 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 304 #if ! defined lint || defined __GNUC__ 305 # define YYUSE(E) ((void) (E)) 310 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 312 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 313 _Pragma ("GCC diagnostic push") \ 314 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 315 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 316 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 317 _Pragma ("GCC diagnostic pop") 319 # define YY_INITIAL_VALUE(Value) Value 321 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 322 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 323 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 325 #ifndef YY_INITIAL_VALUE 326 # define YY_INITIAL_VALUE(Value) 330 #if ! defined yyoverflow || YYERROR_VERBOSE 334 # ifdef YYSTACK_USE_ALLOCA 335 # if YYSTACK_USE_ALLOCA 337 # define YYSTACK_ALLOC __builtin_alloca 338 # elif defined __BUILTIN_VA_ARG_INCR 341 # define YYSTACK_ALLOC __alloca 342 # elif defined _MSC_VER 344 # define alloca _alloca 346 # define YYSTACK_ALLOC alloca 347 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 350 # ifndef EXIT_SUCCESS 351 # define EXIT_SUCCESS 0 358 # ifdef YYSTACK_ALLOC 360 # define YYSTACK_FREE(Ptr) do { ; } while (0) 361 # ifndef YYSTACK_ALLOC_MAXIMUM 366 # define YYSTACK_ALLOC_MAXIMUM 4032 369 # define YYSTACK_ALLOC YYMALLOC 370 # define YYSTACK_FREE YYFREE 371 # ifndef YYSTACK_ALLOC_MAXIMUM 372 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 374 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 375 && ! ((defined YYMALLOC || defined malloc) \ 376 && (defined YYFREE || defined free))) 378 # ifndef EXIT_SUCCESS 379 # define EXIT_SUCCESS 0 383 # define YYMALLOC malloc 384 # if ! defined malloc && ! defined EXIT_SUCCESS 390 # if ! defined free && ! defined EXIT_SUCCESS 398 #if (! defined yyoverflow \ 399 && (! defined __cplusplus \ 400 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ 401 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 412 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 416 # define YYSTACK_BYTES(N) \ 417 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 418 + 2 * YYSTACK_GAP_MAXIMUM) 420 # define YYCOPY_NEEDED 1 427 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 430 YYSIZE_T yynewbytes; \ 431 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 432 Stack = &yyptr->Stack_alloc; \ 433 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 434 yyptr += yynewbytes / sizeof (*yyptr); \ 440 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 444 # if defined __GNUC__ && 1 < __GNUC__ 445 # define YYCOPY(Dst, Src, Count) \ 446 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 448 # define YYCOPY(Dst, Src, Count) \ 452 for (yyi = 0; yyi < (Count); yyi++) \ 453 (Dst)[yyi] = (Src)[yyi]; \ 472 #define YYNSTATES 132 477 #define YYMAXUTOK 282 479 #define YYTRANSLATE(YYX) \ 480 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 486 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490 2, 2, 2, 2, 28, 32, 2, 33, 2, 2,
491 2, 2, 2, 2, 2, 2, 2, 2, 29, 2,
492 2, 34, 2, 2, 2, 2, 2, 2, 2, 2,
493 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
494 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
495 2, 35, 2, 36, 2, 2, 2, 2, 2, 2,
496 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
497 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
498 2, 2, 2, 30, 2, 31, 2, 2, 2, 2,
499 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
511 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
512 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
513 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
521 0, 112, 112, 114, 116, 124, 133, 142, 144, 147,
522 155, 158, 167, 177, 186, 188, 191, 204, 207, 214,
523 216, 217, 218, 219, 220, 221, 222, 223, 226, 261,
524 270, 282, 284, 287, 300, 313, 325, 337, 350, 361,
525 372, 383, 395, 413, 425, 433, 445, 457, 469, 481,
526 486, 491, 495, 502, 512, 524, 533, 542, 551, 560,
527 569, 577, 585, 593, 605, 615, 625, 630, 637, 654,
528 657, 669, 682, 682, 684, 684, 684
532 #if YYDEBUG || YYERROR_VERBOSE || 0 537 "$end",
"error",
"$undefined",
"PE_START_EVENTS",
"PE_START_TERMS",
538 "PE_VALUE",
"PE_VALUE_SYM_HW",
"PE_VALUE_SYM_SW",
"PE_RAW",
"PE_TERM",
539 "PE_EVENT_NAME",
"PE_NAME",
"PE_BPF_OBJECT",
"PE_BPF_SOURCE",
540 "PE_MODIFIER_EVENT",
"PE_MODIFIER_BP",
"PE_NAME_CACHE_TYPE",
541 "PE_NAME_CACHE_OP_RESULT",
"PE_PREFIX_MEM",
"PE_PREFIX_RAW",
542 "PE_PREFIX_GROUP",
"PE_ERROR",
"PE_PMU_EVENT_PRE",
"PE_PMU_EVENT_SUF",
543 "PE_KERNEL_PMU_EVENT",
"PE_ARRAY_ALL",
"PE_ARRAY_RANGE",
544 "PE_DRV_CFG_TERM",
"','",
"':'",
"'{'",
"'}'",
"'-'",
"'/'",
"'='",
545 "'['",
"']'",
"$accept",
"start",
"start_events",
"groups",
"group",
546 "group_def",
"events",
"event",
"event_mod",
"event_name",
"event_def",
547 "event_pmu",
"value_sym",
"event_legacy_symbol",
"event_legacy_cache",
548 "event_legacy_mem",
"event_legacy_tracepoint",
"tracepoint_name",
549 "event_legacy_numeric",
"event_legacy_raw",
"event_bpf_file",
550 "opt_event_config",
"start_terms",
"event_config",
"event_term",
"array",
551 "array_terms",
"array_term",
"sep_dc",
"sep_slash_dc",
YY_NULLPTR 560 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
561 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
562 275, 276, 277, 278, 279, 280, 281, 282, 44, 58,
563 123, 125, 45, 47, 61, 91, 93
567 #define YYPACT_NINF -32 569 #define yypact_value_is_default(Yystate) \ 570 (!!((Yystate) == (-32))) 572 #define YYTABLE_NINF -1 574 #define yytable_value_is_error(Yytable_value) \ 581 -2, 15, 32, 17, 0, -32, -32, 9, 76, -14,
582 9, 9, 53, 39, 33, 66, 42, -32, 48, -32,
583 75, -32, -32, 93, -32, -32, 64, -32, 66, -32,
584 66, 9, 66, 66, -32, -32, 80, 36, -32, -32,
585 82, -32, -32, 108, 3, -32, 70, -32, 104, 42,
586 106, -32, -32, -32, 101, -32, 72, 96, -32, -32,
587 46, -32, 15, 107, -32, -32, 32, -32, -32, -32,
588 -32, -32, -32, 58, -32, 51, 115, 88, 32, 9,
589 -32, 18, -32, 78, 94, 79, 109, 120, -32, 66,
590 42, -32, -32, -32, -32, 47, -32, -32, -32, -32,
591 -32, 100, 4, -32, 68, -32, -32, -32, -32, 116,
592 111, -32, 66, 102, -32, -32, -32, 124, 115, -32,
593 -32, -32, -32, 9, -32, 117, -32, -32, -32, -32,
602 0, 0, 0, 0, 0, 31, 32, 51, 0, 51,
603 51, 51, 51, 0, 0, 73, 0, 2, 4, 7,
604 10, 8, 15, 17, 19, 20, 76, 21, 73, 23,
605 73, 51, 73, 73, 27, 59, 62, 58, 65, 3,
606 52, 54, 1, 0, 0, 46, 51, 18, 0, 0,
607 0, 28, 47, 48, 0, 37, 73, 0, 72, 29,
608 0, 14, 0, 0, 16, 75, 74, 34, 22, 24,
609 42, 25, 26, 0, 67, 0, 0, 0, 0, 51,
610 50, 0, 44, 0, 0, 51, 72, 0, 41, 73,
611 0, 12, 5, 6, 9, 0, 61, 60, 56, 57,
612 55, 70, 0, 69, 0, 53, 45, 49, 11, 0,
613 0, 36, 73, 73, 30, 13, 33, 0, 0, 66,
614 64, 63, 43, 51, 40, 72, 39, 71, 68, 35,
621 -32, -32, -32, -32, 71, -32, 81, 6, -32, -32,
622 126, -32, -32, -32, -32, -32, -32, -32, -32, -32,
623 -32, -7, -32, -31, 57, -32, -32, 19, -22, -32
629 -1, 3, 17, 18, 19, 20, 60, 61, 22, 23,
630 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
631 34, 51, 39, 40, 41, 77, 102, 103, 59, 67
639 45, 1, 2, 52, 53, 55, 68, 21, 69, 35,
640 71, 72, 36, 81, 37, 48, 49, 42, 50, 44,
641 4, 5, 6, 7, 70, 8, 9, 10, 11, 43,
642 38, 12, 118, 13, 88, 95, 80, 14, 35, 15,
643 119, 36, 44, 37, 56, 16, 78, 4, 5, 6,
644 7, 107, 8, 46, 10, 11, 98, 99, 12, 38,
645 13, 74, 100, 96, 14, 57, 15, 114, 93, 97,
646 75, 76, 106, 120, 90, 78, 62, 91, 111, 121,
647 116, 4, 5, 6, 7, 54, 44, 46, 10, 11,
648 124, 126, 12, 65, 13, 58, 115, 66, 14, 48,
649 15, 86, 50, 44, 63, 87, 90, 64, 131, 108,
650 78, 110, 44, 79, 73, 82, 129, 84, 85, 89,
651 101, 94, 104, 109, 112, 113, 117, 122, 123, 127,
652 83, 125, 130, 92, 47, 105, 0, 128
657 7, 3, 4, 10, 11, 12, 28, 1, 30, 6,
658 32, 33, 9, 44, 11, 29, 30, 0, 32, 33,
659 5, 6, 7, 8, 31, 10, 11, 12, 13, 29,
660 27, 16, 28, 18, 56, 66, 33, 22, 6, 24,
661 36, 9, 33, 11, 5, 30, 28, 5, 6, 7,
662 8, 33, 10, 11, 12, 13, 5, 6, 16, 27,
663 18, 25, 11, 5, 22, 32, 24, 89, 62, 11,
664 34, 35, 79, 5, 28, 28, 28, 31, 85, 11,
665 33, 5, 6, 7, 8, 32, 33, 11, 12, 13,
666 112, 113, 16, 29, 18, 29, 90, 33, 22, 29,
667 24, 29, 32, 33, 29, 33, 28, 14, 130, 31,
668 28, 32, 33, 5, 34, 11, 123, 11, 17, 23,
669 5, 14, 34, 29, 15, 5, 26, 11, 17, 5,
670 49, 29, 15, 62, 8, 78, -1, 118
677 0, 3, 4, 38, 5, 6, 7, 8, 10, 11,
678 12, 13, 16, 18, 22, 24, 30, 39, 40, 41,
679 42, 44, 45, 46, 47, 48, 49, 50, 51, 52,
680 53, 54, 55, 56, 57, 6, 9, 11, 27, 59,
681 60, 61, 0, 29, 33, 58, 11, 47, 29, 30,
682 32, 58, 58, 58, 32, 58, 5, 32, 29, 65,
683 43, 44, 28, 29, 14, 29, 33, 66, 65, 65,
684 58, 65, 65, 34, 25, 34, 35, 62, 28, 5,
685 33, 60, 11, 43, 11, 17, 29, 33, 65, 23,
686 28, 31, 41, 44, 14, 60, 5, 11, 5, 6,
687 11, 5, 63, 64, 34, 61, 58, 33, 31, 29,
688 32, 58, 15, 5, 65, 44, 33, 26, 28, 36,
689 5, 11, 11, 17, 65, 29, 65, 5, 64, 58,
696 0, 37, 38, 38, 39, 40, 40, 40, 40, 41,
697 41, 42, 42, 43, 43, 44, 45, 45, 46, 46,
698 47, 47, 47, 47, 47, 47, 47, 47, 48, 48,
699 48, 49, 49, 50, 50, 51, 51, 51, 52, 52,
700 52, 52, 53, 54, 54, 55, 56, 57, 57, 58,
701 58, 58, 59, 60, 60, 61, 61, 61, 61, 61,
702 61, 61, 61, 61, 61, 61, 62, 62, 63, 63,
703 64, 64, 65, 65, 66, 66, 66
709 0, 2, 2, 2, 1, 3, 3, 1, 1, 3,
710 1, 4, 3, 3, 1, 1, 2, 1, 2, 1,
711 1, 1, 2, 1, 2, 2, 2, 1, 2, 2,
712 4, 1, 1, 4, 2, 6, 4, 2, 7, 5,
713 5, 3, 2, 5, 3, 4, 2, 2, 2, 3,
714 2, 0, 1, 3, 1, 3, 3, 3, 1, 1,
715 3, 3, 1, 4, 4, 1, 3, 1, 3, 1,
720 #define yyerrok (yyerrstatus = 0) 721 #define yyclearin (yychar = YYEMPTY) 725 #define YYACCEPT goto yyacceptlab 726 #define YYABORT goto yyabortlab 727 #define YYERROR goto yyerrorlab 730 #define YYRECOVERING() (!!yyerrstatus) 732 #define YYBACKUP(Token, Value) \ 734 if (yychar == YYEMPTY) \ 738 YYPOPSTACK (yylen); \ 744 yyerror (&yylloc, _data, scanner, YY_("syntax error: cannot back up")); \ 751 #define YYERRCODE 256 758 #ifndef YYLLOC_DEFAULT 759 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 763 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 764 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 765 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 766 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 770 (Current).first_line = (Current).last_line = \ 771 YYRHSLOC (Rhs, 0).last_line; \ 772 (Current).first_column = (Current).last_column = \ 773 YYRHSLOC (Rhs, 0).last_column; \ 778 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 786 # define YYFPRINTF fprintf 789 # define YYDPRINTF(Args) \ 800 #ifndef YY_LOCATION_PRINT 801 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 825 else if (0 <= end_col && yylocp->
first_column < end_col)
831 # define YY_LOCATION_PRINT(File, Loc) \ 832 yy_location_print_ (File, &(Loc)) 835 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 840 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 844 YYFPRINTF (stderr, "%s ", Title); \ 845 yy_symbol_print (stderr, \ 846 Type, Value, Location, _data, scanner); \ 847 YYFPRINTF (stderr, "\n"); \ 857 yy_symbol_value_print (FILE *yyoutput,
int yytype, YYSTYPE
const *
const yyvaluep, YYLTYPE
const *
const yylocationp,
void *_data,
void *scanner)
859 FILE *yyo = yyoutput;
868 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
879 yy_symbol_print (FILE *yyoutput,
int yytype, YYSTYPE
const *
const yyvaluep, YYLTYPE
const *
const yylocationp,
void *_data,
void *scanner)
899 for (; yybottom <= yytop; yybottom++)
901 int yybot = *yybottom;
907 # define YY_STACK_PRINT(Bottom, Top) \ 910 yy_stack_print ((Bottom), (Top)); \ 921 unsigned long int yylno =
yyrline[yyrule];
922 int yynrhs =
yyr2[yyrule];
924 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
927 for (yyi = 0; yyi < yynrhs; yyi++)
931 yystos[yyssp[yyi + 1 - yynrhs]],
932 &(yyvsp[(yyi + 1) - (yynrhs)])
933 , &(yylsp[(yyi + 1) - (yynrhs)]) , _data, scanner);
938 # define YY_REDUCE_PRINT(Rule) \ 941 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, _data, scanner); \ 948 # define YYDPRINTF(Args) 949 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 950 # define YY_STACK_PRINT(Bottom, Top) 951 # define YY_REDUCE_PRINT(Rule) 957 # define YYINITDEPTH 200 968 # define YYMAXDEPTH 10000 975 # if defined __GLIBC__ && defined _STRING_H 976 # define yystrlen strlen 980 yystrlen (
const char *yystr)
983 for (yylen = 0; yystr[yylen]; yylen++)
991 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 992 # define yystpcpy stpcpy 997 yystpcpy (
char *yydest,
const char *yysrc)
1000 const char *yys = yysrc;
1002 while ((*yyd++ = *yys++) !=
'\0')
1019 yytnamerr (
char *yyres,
const char *yystr)
1024 char const *yyp = yystr;
1031 goto do_not_strip_quotes;
1035 goto do_not_strip_quotes;
1048 do_not_strip_quotes: ;
1052 return yystrlen (yystr);
1054 return yystpcpy (yyres, yystr) - yyres;
1067 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
1072 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1076 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1106 int yyn =
yypact[*yyssp];
1107 yyarg[yycount++] =
yytname[yytoken];
1113 int yyxbegin = yyn < 0 ? -yyn : 0;
1115 int yychecklim =
YYLAST - yyn + 1;
1119 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1123 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1129 yyarg[yycount++] =
yytname[yyx];
1132 if (! (yysize <= yysize1
1143 # define YYCASE_(N, S) \ 1147 YYCASE_(0,
YY_(
"syntax error"));
1148 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1149 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1150 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1151 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1152 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1157 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1163 if (*yymsg_alloc < yysize)
1165 *yymsg_alloc = 2 * yysize;
1166 if (! (yysize <= *yymsg_alloc
1178 while ((*yyp = *yyformat) !=
'\0')
1179 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1181 yyp += yytnamerr (yyp, yyarg[yyi++]);
1199 yydestruct (
const char *yymsg,
int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp,
void *_data,
void *scanner)
1202 YYUSE (yylocationp);
1235 static YYLTYPE yyloc_default
1236 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 1240 YYLTYPE
yylloc = yyloc_default;
1273 YYLTYPE yyerror_range[3];
1289 char *yymsg = yymsgbuf;
1290 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1293 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) 1299 yyssp = yyss = yyssa;
1300 yyvsp = yyvs = yyvsa;
1301 yylsp = yyls = yylsa;
1304 YYDPRINTF ((stderr,
"Starting parse\n"));
1324 if (yyss + yystacksize - 1 <= yyssp)
1327 YYSIZE_T yysize = yyssp - yyss + 1;
1334 YYSTYPE *yyvs1 = yyvs;
1336 YYLTYPE *yyls1 = yyls;
1342 yyoverflow (
YY_(
"memory exhausted"),
1343 &yyss1, yysize *
sizeof (*yyssp),
1344 &yyvs1, yysize *
sizeof (*yyvsp),
1345 &yyls1, yysize *
sizeof (*yylsp),
1353 # ifndef YYSTACK_RELOCATE 1354 goto yyexhaustedlab;
1358 goto yyexhaustedlab;
1368 goto yyexhaustedlab;
1372 # undef YYSTACK_RELOCATE 1379 yyssp = yyss + yysize - 1;
1380 yyvsp = yyvs + yysize - 1;
1381 yylsp = yyls + yysize - 1;
1383 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1384 (
unsigned long int) yystacksize));
1386 if (yyss + yystacksize - 1 <= yyssp)
1390 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1415 YYDPRINTF ((stderr,
"Reading a token: "));
1419 if (yychar <=
YYEOF)
1421 yychar = yytoken =
YYEOF;
1422 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1488 yyval = yyvsp[1-yylen];
1496 #line 117 "util/parse-events.y" 1498 struct parse_events_evlist *
data = _data;
1502 #line 1503 "util/parse-events-bison.c" 1506 #line 125 "util/parse-events.y" 1508 struct list_head *list = (yyvsp[-2].head);
1509 struct list_head *
group = (yyvsp[0].head);
1512 (yyval.
head) = list;
1514 #line 1515 "util/parse-events-bison.c" 1518 #line 134 "util/parse-events.y" 1520 struct list_head *list = (yyvsp[-2].head);
1521 struct list_head *
event = (yyvsp[0].head);
1524 (yyval.
head) = list;
1526 #line 1527 "util/parse-events-bison.c" 1530 #line 148 "util/parse-events.y" 1532 struct list_head *list = (yyvsp[-2].head);
1535 (yyval.
head) = list;
1537 #line 1538 "util/parse-events-bison.c" 1541 #line 159 "util/parse-events.y" 1543 struct list_head *list = (yyvsp[-1].head);
1547 (yyval.
head) = list;
1549 #line 1550 "util/parse-events-bison.c" 1553 #line 168 "util/parse-events.y" 1555 struct list_head *list = (yyvsp[-1].head);
1559 (yyval.
head) = list;
1561 #line 1562 "util/parse-events-bison.c" 1565 #line 178 "util/parse-events.y" 1567 struct list_head *
event = (yyvsp[0].head);
1568 struct list_head *list = (yyvsp[-2].head);
1571 (yyval.
head) = list;
1573 #line 1574 "util/parse-events-bison.c" 1577 #line 192 "util/parse-events.y" 1579 struct list_head *list = (yyvsp[-1].head);
1587 (yyval.
head) = list;
1589 #line 1590 "util/parse-events-bison.c" 1593 #line 208 "util/parse-events.y" 1597 (yyval.
head) = (yyvsp[0].head);
1599 #line 1600 "util/parse-events-bison.c" 1603 #line 227 "util/parse-events.y" 1605 struct parse_events_evlist *
data = _data;
1606 struct list_head *list, *orig_terms, *terms;
1619 if (!strncmp(name,
"uncore_", 7) &&
1620 strncmp((yyvsp[-1].
str),
"uncore_", 7))
1622 if (!strncmp((yyvsp[-1].
str), name, strlen((yyvsp[-1].
str)))) {
1635 (yyval.
head) = list;
1637 #line 1638 "util/parse-events-bison.c" 1641 #line 262 "util/parse-events.y" 1643 struct list_head *list;
1647 (yyval.
head) = list;
1649 #line 1650 "util/parse-events-bison.c" 1653 #line 271 "util/parse-events.y" 1655 struct list_head *list;
1658 snprintf(&pmu_name, 128,
"%s-%s", (yyvsp[-3].
str), (yyvsp[-1].
str));
1661 (yyval.
head) = list;
1663 #line 1664 "util/parse-events-bison.c" 1667 #line 288 "util/parse-events.y" 1669 struct parse_events_evlist *
data = _data;
1670 struct list_head *list;
1671 int type = (yyvsp[-3].num) >> 16;
1672 int config = (yyvsp[-3].num) & 255;
1677 (yyval.
head) = list;
1679 #line 1680 "util/parse-events-bison.c" 1683 #line 301 "util/parse-events.y" 1685 struct parse_events_evlist *
data = _data;
1686 struct list_head *list;
1687 int type = (yyvsp[-1].num) >> 16;
1688 int config = (yyvsp[-1].num) & 255;
1692 (yyval.
head) = list;
1694 #line 1695 "util/parse-events-bison.c" 1698 #line 314 "util/parse-events.y" 1700 struct parse_events_evlist *
data = _data;
1702 struct list_head *list;
1707 (yyval.
head) = list;
1709 #line 1710 "util/parse-events-bison.c" 1713 #line 326 "util/parse-events.y" 1715 struct parse_events_evlist *
data = _data;
1717 struct list_head *list;
1722 (yyval.
head) = list;
1724 #line 1725 "util/parse-events-bison.c" 1728 #line 338 "util/parse-events.y" 1730 struct parse_events_evlist *
data = _data;
1732 struct list_head *list;
1737 (yyval.
head) = list;
1739 #line 1740 "util/parse-events-bison.c" 1743 #line 351 "util/parse-events.y" 1745 struct parse_events_evlist *
data = _data;
1746 struct list_head *list;
1750 (
void *) (yyvsp[-5].num), (yyvsp[-1].str), (yyvsp[-3].num)));
1751 (yyval.
head) = list;
1753 #line 1754 "util/parse-events-bison.c" 1757 #line 362 "util/parse-events.y" 1759 struct parse_events_evlist *
data = _data;
1760 struct list_head *list;
1764 (
void *) (yyvsp[-3].num), NULL, (yyvsp[-1].num)));
1765 (yyval.
head) = list;
1767 #line 1768 "util/parse-events-bison.c" 1771 #line 373 "util/parse-events.y" 1773 struct parse_events_evlist *
data = _data;
1774 struct list_head *list;
1778 (
void *) (yyvsp[-3].num), (yyvsp[-1].str), 0));
1779 (yyval.
head) = list;
1781 #line 1782 "util/parse-events-bison.c" 1785 #line 384 "util/parse-events.y" 1787 struct parse_events_evlist *
data = _data;
1788 struct list_head *list;
1792 (
void *) (yyvsp[-1].num), NULL, 0));
1793 (yyval.
head) = list;
1795 #line 1796 "util/parse-events-bison.c" 1799 #line 396 "util/parse-events.y" 1801 struct parse_events_evlist *
data = _data;
1803 struct list_head *list;
1807 error->
idx = (yylsp[-1]).first_column;
1810 error, (yyvsp[0].head)))
1813 (yyval.
head) = list;
1815 #line 1816 "util/parse-events-bison.c" 1819 #line 414 "util/parse-events.y" 1824 snprintf(&sys_name, 128,
"%s-%s", (yyvsp[-4].
str), (yyvsp[-2].
str));
1825 tracepoint.sys = &sys_name;
1826 tracepoint.event = (yyvsp[0].str);
1830 #line 1831 "util/parse-events-bison.c" 1834 #line 426 "util/parse-events.y" 1840 #line 1841 "util/parse-events-bison.c" 1844 #line 434 "util/parse-events.y" 1846 struct parse_events_evlist *
data = _data;
1847 struct list_head *list;
1852 (yyval.
head) = list;
1854 #line 1855 "util/parse-events-bison.c" 1858 #line 446 "util/parse-events.y" 1860 struct parse_events_evlist *
data = _data;
1861 struct list_head *list;
1866 (yyval.
head) = list;
1868 #line 1869 "util/parse-events-bison.c" 1872 #line 458 "util/parse-events.y" 1874 struct parse_events_evlist *
data = _data;
1876 struct list_head *list;
1881 (yyval.
head) = list;
1883 #line 1884 "util/parse-events-bison.c" 1887 #line 470 "util/parse-events.y" 1889 struct parse_events_evlist *
data = _data;
1890 struct list_head *list;
1895 (yyval.
head) = list;
1897 #line 1898 "util/parse-events-bison.c" 1901 #line 482 "util/parse-events.y" 1905 #line 1906 "util/parse-events-bison.c" 1909 #line 487 "util/parse-events.y" 1911 (yyval.
head) = NULL;
1913 #line 1914 "util/parse-events-bison.c" 1917 #line 491 "util/parse-events.y" 1919 (yyval.
head) = NULL;
1921 #line 1922 "util/parse-events-bison.c" 1925 #line 496 "util/parse-events.y" 1928 data->terms = (yyvsp[0].head);
1930 #line 1931 "util/parse-events-bison.c" 1934 #line 503 "util/parse-events.y" 1936 struct list_head *
head = (yyvsp[-2].head);
1940 list_add_tail(&term->
list, head);
1941 (yyval.
head) = (yyvsp[-2].head);
1943 #line 1944 "util/parse-events-bison.c" 1947 #line 513 "util/parse-events.y" 1949 struct list_head *
head =
malloc(
sizeof(*head));
1953 INIT_LIST_HEAD(head);
1954 list_add_tail(&term->
list, head);
1955 (yyval.
head) = head;
1957 #line 1958 "util/parse-events-bison.c" 1961 #line 525 "util/parse-events.y" 1966 (yyvsp[-2].
str), (yyvsp[0].
str), &(yylsp[-2]), &(yylsp[0])));
1967 (yyval.
term) = term;
1969 #line 1970 "util/parse-events-bison.c" 1973 #line 534 "util/parse-events.y" 1978 (yyvsp[-2].
str), (yyvsp[0].
num),
false, &(yylsp[-2]), &(yylsp[0])));
1979 (yyval.
term) = term;
1981 #line 1982 "util/parse-events-bison.c" 1985 #line 543 "util/parse-events.y" 1988 int config = (yyvsp[0].num) & 255;
1991 (yyval.
term) = term;
1993 #line 1994 "util/parse-events-bison.c" 1997 #line 552 "util/parse-events.y" 2002 (yyvsp[0].
str), 1,
true, &(yylsp[0]), NULL));
2003 (yyval.
term) = term;
2005 #line 2006 "util/parse-events-bison.c" 2009 #line 561 "util/parse-events.y" 2012 int config = (yyvsp[0].num) & 255;
2015 (yyval.
term) = term;
2017 #line 2018 "util/parse-events-bison.c" 2021 #line 570 "util/parse-events.y" 2026 (yyval.
term) = term;
2028 #line 2029 "util/parse-events-bison.c" 2032 #line 578 "util/parse-events.y" 2037 (yyval.
term) = term;
2039 #line 2040 "util/parse-events-bison.c" 2043 #line 586 "util/parse-events.y" 2048 (yyval.
term) = term;
2050 #line 2051 "util/parse-events-bison.c" 2054 #line 594 "util/parse-events.y" 2060 (yyvsp[-3].
str), (yyvsp[0].
str), &(yylsp[-3]), &(yylsp[0])));
2062 term->
array = (yyvsp[-2].array);
2063 (yyval.
term) = term;
2065 #line 2066 "util/parse-events-bison.c" 2069 #line 606 "util/parse-events.y" 2074 (yyvsp[-3].
str), (yyvsp[0].
num),
false, &(yylsp[-3]), &(yylsp[0])));
2075 term->
array = (yyvsp[-2].array);
2076 (yyval.
term) = term;
2078 #line 2079 "util/parse-events-bison.c" 2082 #line 616 "util/parse-events.y" 2087 (yyvsp[0].
str), (yyvsp[0].str), &(yylsp[0]), NULL));
2088 (yyval.
term) = term;
2090 #line 2091 "util/parse-events-bison.c" 2094 #line 626 "util/parse-events.y" 2096 (yyval.
array) = (yyvsp[-1].array);
2098 #line 2099 "util/parse-events-bison.c" 2102 #line 631 "util/parse-events.y" 2104 (yyval.
array).nr_ranges = 0;
2105 (yyval.
array).ranges = NULL;
2107 #line 2108 "util/parse-events-bison.c" 2111 #line 638 "util/parse-events.y" 2124 free((yyvsp[0].array).ranges);
2125 (yyval.
array) = new_array;
2127 #line 2128 "util/parse-events-bison.c" 2131 #line 658 "util/parse-events.y" 2140 (yyval.
array) = array;
2142 #line 2143 "util/parse-events-bison.c" 2146 #line 670 "util/parse-events.y" 2155 array.
ranges[0].
length = (yyvsp[0].num) - (yyvsp[-2].num) + 1;
2156 (yyval.
array) = array;
2158 #line 2159 "util/parse-events-bison.c" 2162 #line 2163 "util/parse-events-bison.c" 2192 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
2212 #if ! YYERROR_VERBOSE 2213 yyerror (&yylloc, _data, scanner,
YY_(
"syntax error"));
2215 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 2218 char const *yymsgp =
YY_(
"syntax error");
2219 int yysyntax_error_status;
2220 yysyntax_error_status = YYSYNTAX_ERROR;
2221 if (yysyntax_error_status == 0)
2223 else if (yysyntax_error_status == 1)
2225 if (yymsg != yymsgbuf)
2231 yymsg_alloc =
sizeof yymsgbuf;
2232 yysyntax_error_status = 2;
2236 yysyntax_error_status = YYSYNTAX_ERROR;
2240 yyerror (&yylloc, _data, scanner, yymsgp);
2241 if (yysyntax_error_status == 2)
2242 goto yyexhaustedlab;
2244 # undef YYSYNTAX_ERROR 2248 yyerror_range[1] =
yylloc;
2250 if (yyerrstatus == 3)
2255 if (yychar <=
YYEOF)
2258 if (yychar ==
YYEOF)
2264 yytoken, &
yylval, &yylloc, _data, scanner);
2285 yyerror_range[1] = yylsp[1-yylen];
2319 yyerror_range[1] = *yylsp;
2321 yystos[yystate], yyvsp, yylsp, _data, scanner);
2331 yyerror_range[2] =
yylloc;
2358 #if !defined yyoverflow || YYERROR_VERBOSE 2363 yyerror (&yylloc, _data, scanner,
YY_(
"memory exhausted"));
2375 yytoken, &
yylval, &yylloc, _data, scanner);
2381 while (yyssp != yyss)
2384 yystos[*yyssp], yyvsp, yylsp, _data, scanner);
2392 if (yymsg != yymsgbuf)
2397 #line 686 "util/parse-events.y" 2401 void *scanner __maybe_unused,
2402 char const *msg __maybe_unused)
static const yytype_uint8 yytable[]
int parse_events_copy_term_list(struct list_head *old, struct list_head **new)
int parse_events_name(struct list_head *list, char *name)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
int parse_events_terms(struct list_head *terms, const char *str)
void parse_events_terms__delete(struct list_head *terms)
#define YYSTACK_ALLOC_MAXIMUM
#define YY_INITIAL_VALUE(Value)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
unsigned short int yytype_uint16
static const yytype_uint8 yyr1[]
int parse_events__modifier_event(struct list_head *list, char *str, bool add)
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, void *_data, void *scanner)
static YY_ATTRIBUTE_UNUSED unsigned yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp)
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, YYLTYPE const *const yylocationp, void *_data, void *scanner)
int parse_events_multi_pmu_add(struct parse_events_state *parse_state, char *str, struct list_head **listp)
struct parse_events_array array
struct perf_pmu * perf_pmu__scan(struct perf_pmu *pmu)
unsigned char yytype_uint8
int parse_events_add_cache(struct list_head *list, int *idx, char *type, char *op_result1, char *op_result2, struct parse_events_error *err, struct list_head *head_config)
static void inc_group_count(struct list_head *list, struct parse_events_evlist *data)
#define yypact_value_is_default(Yystate)
unsigned char yytype_uint8
struct parse_events_array array
int parse_events_term__str(struct parse_events_term **term, int type_term, char *config, char *str, void *loc_term_, void *loc_val_)
int parse_events_add_tracepoint(struct list_head *list, int *idx, const char *sys, const char *event, struct parse_events_error *err, struct list_head *head_config)
static const yytype_int8 yypgoto[]
int parse_events_add_numeric(struct parse_events_state *parse_state, struct list_head *list, u32 type, u64 config, struct list_head *head_config)
void parse_events_evlist_error(struct parse_events_state *parse_state, int idx, const char *str)
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, YYLTYPE const *const yylocationp, void *_data, void *scanner)
int parse_events_parse(void *_data, void *scanner)
x86 movsq based memcpy() in arch/x86/lib/memcpy_64.S") MEMCPY_FN(memcpy_erms
#define YY_REDUCE_PRINT(Rule)
void parse_events_error(YYLTYPE *loc, void *data, void *scanner, char const *msg)
static const yytype_uint8 yydefact[]
void parse_events__set_leader(char *name, struct list_head *list, struct parse_events_state *parse_state)
struct parse_events_term * term
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
int parse_events_add_pmu(struct parse_events_state *parse_state, struct list_head *list, char *name, struct list_head *head_config, bool auto_merge_stats, bool use_alias)
int parse_events__modifier_group(struct list_head *list, char *event_mod)
#define YY_LOCATION_PRINT(File, Loc)
static const yytype_int16 yycheck[]
int parse_events_add_breakpoint(struct list_head *list, int *idx, void *ptr, char *type, u64 len)
struct YYSTYPE::tracepoint_name tracepoint_name
static const yytype_uint8 yystos[]
static const char *const yytname[]
#define YYLLOC_DEFAULT(Current, Rhs, N)
static const yytype_uint16 yyrline[]
#define YY_STACK_PRINT(Bottom, Top)
static const yytype_int8 yypact[]
void parse_events_update_lists(struct list_head *list_event, struct list_head *list_all)
#define YY_ATTRIBUTE_UNUSED
static const yytype_uint8 yytranslate[]
static const yytype_uint8 yyr2[]
static const yytype_int8 yydefgoto[]
int parse_events_term__num(struct parse_events_term **term, int type_term, char *config, u64 num, bool no_value, void *loc_term_, void *loc_val_)
int parse_events_term__sym_hw(struct parse_events_term **term, char *config, unsigned idx)
unsigned short int yytype_uint16
struct parse_events_array::@131 * ranges
#define yytable_value_is_error(Yytable_value)
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, void *_data, void *scanner)
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
int parse_events_load_bpf(struct parse_events_state *parse_state, struct list_head *list, char *bpf_file_name, bool source, struct list_head *head_config)