47 #define YYBISON_VERSION "3.0.4" 50 #define YYSKELETON_NAME "yacc.c" 63 #define yyparse perf_pmu_parse 64 #define yylex perf_pmu_lex 65 #define yyerror perf_pmu_error 66 #define yydebug perf_pmu_debug 67 #define yynerrs perf_pmu_nerrs 69 #define yylval perf_pmu_lval 70 #define yychar perf_pmu_char 76 #include <linux/compiler.h> 77 #include <linux/list.h> 78 #include <linux/bitmap.h> 84 #define ABORT_ON(val) \ 91 #line 92 "util/pmu-bison.c" 94 # if defined __cplusplus && 201103L <= __cplusplus 95 # define YY_NULLPTR nullptr 102 #ifdef YYERROR_VERBOSE 103 # undef YYERROR_VERBOSE 104 # define YYERROR_VERBOSE 1 106 # define YYERROR_VERBOSE 0 111 #ifndef YY_PERF_PMU_UTIL_PMU_BISON_H_INCLUDED 112 # define YY_PERF_PMU_UTIL_PMU_BISON_H_INCLUDED 118 extern int perf_pmu_debug;
135 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 139 #line 30 "util/pmu.y" 144 #line 145 "util/pmu-bison.c" 148 # define YYSTYPE_IS_TRIVIAL 1 149 # define YYSTYPE_IS_DECLARED 1 161 #line 162 "util/pmu-bison.c" 192 # ifdef __SIZE_TYPE__ 193 # define YYSIZE_T __SIZE_TYPE__ 194 # elif defined size_t 195 # define YYSIZE_T size_t 196 # elif ! defined YYSIZE_T 198 # define YYSIZE_T size_t 200 # define YYSIZE_T unsigned int 204 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 207 # if defined YYENABLE_NLS && YYENABLE_NLS 209 # include <libintl.h> 210 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 214 # define YY_(Msgid) Msgid 219 # if (defined __GNUC__ \ 220 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 221 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 222 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 224 # define YY_ATTRIBUTE(Spec) 228 #ifndef YY_ATTRIBUTE_PURE 229 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 232 #ifndef YY_ATTRIBUTE_UNUSED 233 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 236 #if !defined _Noreturn \ 237 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 238 # if defined _MSC_VER && 1200 <= _MSC_VER 239 # define _Noreturn __declspec (noreturn) 241 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 246 #if ! defined lint || defined __GNUC__ 247 # define YYUSE(E) ((void) (E)) 252 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 254 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 255 _Pragma ("GCC diagnostic push") \ 256 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 257 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 258 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 259 _Pragma ("GCC diagnostic pop") 261 # define YY_INITIAL_VALUE(Value) Value 263 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 264 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 265 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 267 #ifndef YY_INITIAL_VALUE 268 # define YY_INITIAL_VALUE(Value) 272 #if ! defined yyoverflow || YYERROR_VERBOSE 276 # ifdef YYSTACK_USE_ALLOCA 277 # if YYSTACK_USE_ALLOCA 279 # define YYSTACK_ALLOC __builtin_alloca 280 # elif defined __BUILTIN_VA_ARG_INCR 283 # define YYSTACK_ALLOC __alloca 284 # elif defined _MSC_VER 286 # define alloca _alloca 288 # define YYSTACK_ALLOC alloca 289 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 292 # ifndef EXIT_SUCCESS 293 # define EXIT_SUCCESS 0 300 # ifdef YYSTACK_ALLOC 302 # define YYSTACK_FREE(Ptr) do { ; } while (0) 303 # ifndef YYSTACK_ALLOC_MAXIMUM 308 # define YYSTACK_ALLOC_MAXIMUM 4032 311 # define YYSTACK_ALLOC YYMALLOC 312 # define YYSTACK_FREE YYFREE 313 # ifndef YYSTACK_ALLOC_MAXIMUM 314 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 316 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 317 && ! ((defined YYMALLOC || defined malloc) \ 318 && (defined YYFREE || defined free))) 320 # ifndef EXIT_SUCCESS 321 # define EXIT_SUCCESS 0 325 # define YYMALLOC malloc 326 # if ! defined malloc && ! defined EXIT_SUCCESS 332 # if ! defined free && ! defined EXIT_SUCCESS 340 #if (! defined yyoverflow \ 341 && (! defined __cplusplus \ 342 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 352 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 356 # define YYSTACK_BYTES(N) \ 357 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 358 + YYSTACK_GAP_MAXIMUM) 360 # define YYCOPY_NEEDED 1 367 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 370 YYSIZE_T yynewbytes; \ 371 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 372 Stack = &yyptr->Stack_alloc; \ 373 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 374 yyptr += yynewbytes / sizeof (*yyptr); \ 380 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 384 # if defined __GNUC__ && 1 < __GNUC__ 385 # define YYCOPY(Dst, Src, Count) \ 386 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 388 # define YYCOPY(Dst, Src, Count) \ 392 for (yyi = 0; yyi < (Count); yyi++) \ 393 (Dst)[yyi] = (Src)[yyi]; \ 417 #define YYMAXUTOK 262 419 #define YYTRANSLATE(YYX) \ 420 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 426 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 9, 10, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 8, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
459 0, 38, 38, 40, 43, 50, 57, 65, 70, 76,
464 #if YYDEBUG || YYERROR_VERBOSE || 0 467 static const char *
const yytname[] =
469 "$end",
"error",
"$undefined",
"PP_CONFIG",
"PP_CONFIG1",
"PP_CONFIG2",
470 "PP_VALUE",
"PP_ERROR",
"':'",
"','",
"'-'",
"$accept",
"format",
480 0, 256, 257, 258, 259, 260, 261, 262, 58, 44,
485 #define YYPACT_NINF -7 487 #define yypact_value_is_default(Yystate) \ 488 (!!((Yystate) == (-7))) 490 #define YYTABLE_NINF -1 492 #define yytable_value_is_error(Yytable_value) \ 499 3, 1, 2, 4, 0, -7, 5, 5, 5, -7,
500 -7, 6, 8, -7, 8, 8, 7, 5, -7, -7
508 0, 0, 0, 0, 0, 3, 0, 0, 0, 1,
509 2, 10, 4, 8, 5, 6, 0, 0, 9, 7
529 9, 14, 15, 1, 2, 3, 1, 2, 3, 6,
530 7, 11, 8, 18, 10, 19, 16, 17
535 0, 7, 8, 3, 4, 5, 3, 4, 5, 8,
536 8, 6, 8, 6, 4, 17, 10, 9
543 0, 3, 4, 5, 12, 13, 8, 8, 8, 0,
544 13, 6, 14, 15, 14, 14, 10, 9, 6, 15
550 0, 11, 12, 12, 13, 13, 13, 14, 14, 15,
557 0, 2, 2, 1, 3, 3, 3, 3, 1, 3,
562 #define yyerrok (yyerrstatus = 0) 563 #define yyclearin (yychar = YYEMPTY) 567 #define YYACCEPT goto yyacceptlab 568 #define YYABORT goto yyabortlab 569 #define YYERROR goto yyerrorlab 572 #define YYRECOVERING() (!!yyerrstatus) 574 #define YYBACKUP(Token, Value) \ 576 if (yychar == YYEMPTY) \ 580 YYPOPSTACK (yylen); \ 586 yyerror (format, name, YY_("syntax error: cannot back up")); \ 593 #define YYERRCODE 256 602 # define YYFPRINTF fprintf 605 # define YYDPRINTF(Args) \ 612 #ifndef YY_LOCATION_PRINT 613 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 617 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 621 YYFPRINTF (stderr, "%s ", Title); \ 622 yy_symbol_print (stderr, \ 623 Type, Value, format, name); \ 624 YYFPRINTF (stderr, "\n"); \ 636 FILE *yyo = yyoutput;
644 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
673 for (; yybottom <= yytop; yybottom++)
675 int yybot = *yybottom;
681 # define YY_STACK_PRINT(Bottom, Top) \ 684 yy_stack_print ((Bottom), (Top)); \ 695 unsigned long int yylno =
yyrline[yyrule];
696 int yynrhs =
yyr2[yyrule];
698 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
701 for (yyi = 0; yyi < yynrhs; yyi++)
705 yystos[yyssp[yyi + 1 - yynrhs]],
706 &(yyvsp[(yyi + 1) - (yynrhs)])
712 # define YY_REDUCE_PRINT(Rule) \ 715 yy_reduce_print (yyssp, yyvsp, Rule, format, name); \ 722 # define YYDPRINTF(Args) 723 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 724 # define YY_STACK_PRINT(Bottom, Top) 725 # define YY_REDUCE_PRINT(Rule) 731 # define YYINITDEPTH 200 742 # define YYMAXDEPTH 10000 749 # if defined __GLIBC__ && defined _STRING_H 750 # define yystrlen strlen 754 yystrlen (
const char *yystr)
757 for (yylen = 0; yystr[yylen]; yylen++)
765 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 766 # define yystpcpy stpcpy 771 yystpcpy (
char *yydest,
const char *yysrc)
774 const char *yys = yysrc;
776 while ((*yyd++ = *yys++) !=
'\0')
793 yytnamerr (
char *yyres,
const char *yystr)
798 char const *yyp = yystr;
805 goto do_not_strip_quotes;
809 goto do_not_strip_quotes;
822 do_not_strip_quotes: ;
826 return yystrlen (yystr);
828 return yystpcpy (yyres, yystr) - yyres;
841 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
846 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
850 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
881 yyarg[yycount++] =
yytname[yytoken];
887 int yyxbegin = yyn < 0 ? -yyn : 0;
889 int yychecklim =
YYLAST - yyn + 1;
893 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
897 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
903 yyarg[yycount++] =
yytname[yyx];
906 if (! (yysize <= yysize1
917 # define YYCASE_(N, S) \ 921 YYCASE_(0,
YY_(
"syntax error"));
922 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
923 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
924 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
925 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
926 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
931 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
937 if (*yymsg_alloc < yysize)
939 *yymsg_alloc = 2 * yysize;
940 if (! (yysize <= *yymsg_alloc
952 while ((*yyp = *yyformat) !=
'\0')
953 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
955 yyp += yytnamerr (yyp, yyarg[yyi++]);
1040 char *yymsg = yymsgbuf;
1041 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1044 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1050 yyssp = yyss = yyssa;
1051 yyvsp = yyvs = yyvsa;
1054 YYDPRINTF ((stderr,
"Starting parse\n"));
1073 if (yyss + yystacksize - 1 <= yyssp)
1076 YYSIZE_T yysize = yyssp - yyss + 1;
1090 yyoverflow (
YY_(
"memory exhausted"),
1091 &yyss1, yysize *
sizeof (*yyssp),
1092 &yyvs1, yysize *
sizeof (*yyvsp),
1099 # ifndef YYSTACK_RELOCATE 1100 goto yyexhaustedlab;
1104 goto yyexhaustedlab;
1114 goto yyexhaustedlab;
1117 # undef YYSTACK_RELOCATE 1124 yyssp = yyss + yysize - 1;
1125 yyvsp = yyvs + yysize - 1;
1127 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1128 (
unsigned long int) yystacksize));
1130 if (yyss + yystacksize - 1 <= yyssp)
1134 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1159 YYDPRINTF ((stderr,
"Reading a token: "));
1166 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1232 yyval = yyvsp[1-yylen];
1239 #line 44 "util/pmu.y" 1245 #line 1246 "util/pmu-bison.c" 1249 #line 51 "util/pmu.y" 1255 #line 1256 "util/pmu-bison.c" 1259 #line 58 "util/pmu.y" 1265 #line 1266 "util/pmu-bison.c" 1269 #line 66 "util/pmu.y" 1271 bitmap_or((yyval.bits), (yyvsp[-2].bits), (yyvsp[0].bits), 64);
1273 #line 1274 "util/pmu-bison.c" 1277 #line 71 "util/pmu.y" 1279 memcpy((yyval.bits), (yyvsp[0].bits),
sizeof((yyvsp[0].bits)));
1281 #line 1282 "util/pmu-bison.c" 1285 #line 77 "util/pmu.y" 1289 #line 1290 "util/pmu-bison.c" 1293 #line 82 "util/pmu.y" 1297 #line 1298 "util/pmu-bison.c" 1301 #line 1302 "util/pmu-bison.c" 1330 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
1350 #if ! YYERROR_VERBOSE 1353 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 1356 char const *yymsgp =
YY_(
"syntax error");
1357 int yysyntax_error_status;
1358 yysyntax_error_status = YYSYNTAX_ERROR;
1359 if (yysyntax_error_status == 0)
1361 else if (yysyntax_error_status == 1)
1363 if (yymsg != yymsgbuf)
1369 yymsg_alloc =
sizeof yymsgbuf;
1370 yysyntax_error_status = 2;
1374 yysyntax_error_status = YYSYNTAX_ERROR;
1378 yyerror (format, name, yymsgp);
1379 if (yysyntax_error_status == 2)
1380 goto yyexhaustedlab;
1382 # undef YYSYNTAX_ERROR 1388 if (yyerrstatus == 3)
1402 yytoken, &yylval, format, name);
1458 yystos[yystate], yyvsp, format, name);
1490 #if !defined yyoverflow || YYERROR_VERBOSE 1495 yyerror (format, name,
YY_(
"memory exhausted"));
1507 yytoken, &yylval, format, name);
1513 while (yyssp != yyss)
1516 yystos[*yyssp], yyvsp, format, name);
1524 if (yymsg != yymsgbuf)
1529 #line 86 "util/pmu.y" 1533 char *
name __maybe_unused,
1534 char const *msg __maybe_unused)
unsigned char yytype_uint8
static const yytype_int8 yypact[]
static const yytype_uint8 yyr2[]
static const yytype_int8 yydefgoto[]
static const yytype_int8 yypgoto[]
unsigned short int yytype_uint16
#define yytable_value_is_error(Yytable_value)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_STACK_PRINT(Bottom, Top)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
unsigned short int yytype_uint16
#define YY_REDUCE_PRINT(Rule)
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, void *_data, void *scanner)
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, YYLTYPE const *const yylocationp, void *_data, void *scanner)
unsigned char yytype_uint8
void perf_pmu__set_format(unsigned long *bits, long from, long to)
static const yytype_uint8 yystos[]
int perf_pmu__new_format(struct list_head *list, char *name, int config, unsigned long *bits)
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, YYLTYPE const *const yylocationp, void *_data, void *scanner)
int perf_pmu_parse(struct list_head *format, char *name)
x86 movsq based memcpy() in arch/x86/lib/memcpy_64.S") MEMCPY_FN(memcpy_erms
static const yytype_uint8 yycheck[]
DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
void perf_pmu_error(struct list_head *list __maybe_unused, char *name __maybe_unused, char const *msg __maybe_unused)
static const yytype_uint8 yydefact[]
static const char *const yytname[]
#define YYSTACK_ALLOC_MAXIMUM
#define yypact_value_is_default(Yystate)
static const yytype_uint16 yyrline[]
static const yytype_uint8 yyr1[]
static const yytype_uint8 yytable[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct list_head *format, char *name)
static const yytype_uint8 yytranslate[]
#define PERF_PMU_FORMAT_BITS
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)