lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1332950153-8606-2-git-send-email-jolsa@redhat.com>
Date:	Wed, 28 Mar 2012 17:55:49 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	acme@...hat.com, a.p.zijlstra@...llo.nl, mingo@...e.hu,
	paulus@...ba.org, cjashfor@...ux.vnet.ibm.com, fweisbec@...il.com
Cc:	linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...hat.com>
Subject: [PATCH 1/5] perf, tool: Add hardcoded name term for pmu events

Adding a new hardcoded term 'name' allowing to specify a name
for the pmu event. The term is defined along with standard
pmu terms. If no 'name' term is given, the event name become
the pmu name itself ('cpu' for the example below).

running:
  perf stat -e cpu/config=1,name=krava1/u ls

will produce following output:
 ...
 Performance counter stats for 'ls':

                 0 krava1

       0.009779735 seconds time elapsed

Signed-off-by: Jiri Olsa <jolsa@...hat.com>
---
 tools/perf/builtin-test.c            |   26 ++
 tools/perf/util/parse-events-bison.c |   83 +++--
 tools/perf/util/parse-events-flex.c  |  580 +++++++++++++++++-----------------
 tools/perf/util/parse-events-flex.h  |    2 +-
 tools/perf/util/parse-events.c       |   10 +-
 tools/perf/util/parse-events.h       |    3 +
 tools/perf/util/parse-events.l       |    1 +
 tools/perf/util/parse-events.y       |    8 +
 tools/perf/util/pmu.c                |   15 +-
 tools/perf/util/pmu.h                |    2 +
 10 files changed, 404 insertions(+), 326 deletions(-)

diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index 1c5b980..d522cf4 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -986,6 +986,28 @@ static int test__checkevent_list(struct perf_evlist *evlist)
 	return 0;
 }
 
+static int test__checkevent_pmu_name(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel = list_entry(evlist->entries.next,
+					      struct perf_evsel, node);
+
+	/* cpu/config=1,name=krava1/u */
+	evsel = list_entry(evlist->entries.next, struct perf_evsel, node);
+	TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",  1 == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong name", !strcmp(evsel->name, "krava"));
+
+	/* cpu/config=2/" */
+	evsel = list_entry(evsel->node.next, struct perf_evsel, node);
+	TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",  2 == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong name", !strcmp(evsel->name, "cpu"));
+
+	return 0;
+}
+
 static struct test__event_st {
 	const char *name;
 	__u32 type;
@@ -1091,6 +1113,10 @@ static struct test__event_st {
 		.name  = "r1,syscalls:sys_enter_open:k,1:1:hp",
 		.check = test__checkevent_list,
 	},
+	{
+		.name  = "cpu/config=1,name=krava/u,cpu/config=2/u",
+		.check = test__checkevent_pmu_name,
+	},
 };
 
 #define TEST__EVENTS_CNT (sizeof(test__events) / sizeof(struct test__event_st))
diff --git a/tools/perf/util/parse-events-bison.c b/tools/perf/util/parse-events-bison.c
index 4a4e02a..ffa6dd8 100644
--- a/tools/perf/util/parse-events-bison.c
+++ b/tools/perf/util/parse-events-bison.c
@@ -386,16 +386,16 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  25
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   43
+#define YYLAST   44
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  20
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  15
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  35
+#define YYNRULES  36
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  57
+#define YYNSTATES  58
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
@@ -444,7 +444,7 @@ static const yytype_uint8 yyprhs[] =
        0,     0,     3,     7,     9,    12,    14,    16,    18,    21,
       23,    26,    29,    32,    37,    42,    45,    51,    55,    57,
       63,    67,    71,    75,    77,    81,    83,    87,    91,    93,
-      97,    99,   101,   102,   104,   106
+      97,   101,   103,   105,   106,   108,   110
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
@@ -459,8 +459,9 @@ static const yytype_int8 yyrhs[] =
        9,    33,    -1,    12,     3,    33,    -1,     7,    18,     7,
       -1,     3,    18,     3,    -1,     5,    -1,    31,    15,    32,
       -1,    32,    -1,     7,    19,     7,    -1,     7,    19,     3,
-      -1,     7,    -1,     6,    19,     3,    -1,     6,    -1,    18,
-      -1,    -1,    16,    -1,    18,    -1,    -1
+      -1,     7,    -1,     6,    19,     7,    -1,     6,    19,     3,
+      -1,     6,    -1,    18,    -1,    -1,    16,    -1,    18,    -1,
+      -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -469,7 +470,7 @@ static const yytype_uint8 yyrline[] =
        0,    55,    55,    55,    58,    69,    74,    75,    76,    77,
       78,    79,    80,    83,    90,    99,   108,   113,   118,   124,
      129,   135,   141,   147,   153,   163,   175,   184,   193,   202,
-     210,   218,   218,   220,   220,   220
+     210,   218,   226,   226,   228,   228,   228
 };
 #endif
 
@@ -505,7 +506,7 @@ static const yytype_uint8 yyr1[] =
        0,    20,    21,    21,    22,    22,    23,    23,    23,    23,
       23,    23,    23,    24,    25,    25,    26,    26,    26,    27,
       27,    28,    29,    30,    31,    31,    32,    32,    32,    32,
-      32,    33,    33,    34,    34,    34
+      32,    32,    33,    33,    34,    34,    34
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -514,7 +515,7 @@ static const yytype_uint8 yyr2[] =
        0,     2,     3,     1,     2,     1,     1,     1,     2,     1,
        2,     2,     2,     4,     4,     2,     5,     3,     1,     5,
        3,     3,     3,     1,     3,     1,     3,     3,     1,     3,
-       1,     1,     0,     1,     1,     0
+       3,     1,     1,     0,     1,     1,     0
 };
 
 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@@ -522,12 +523,12 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    35,    23,     0,    18,     0,     0,     3,     5,
-       6,     7,    32,     9,    32,    32,    32,     0,    33,    34,
-      15,     0,     0,     0,    32,     1,     0,     4,    31,     8,
-      10,    11,    12,    22,    30,    28,     0,    25,     0,    21,
-      17,    31,    20,     2,     0,     0,     0,    14,    13,     0,
-      32,    29,    27,    26,    24,    16,    19
+       0,     0,    36,    23,     0,    18,     0,     0,     3,     5,
+       6,     7,    33,     9,    33,    33,    33,     0,    34,    35,
+      15,     0,     0,     0,    33,     1,     0,     4,    32,     8,
+      10,    11,    12,    22,    31,    28,     0,    25,     0,    21,
+      17,    32,    20,     2,     0,     0,     0,    14,    13,     0,
+      33,    30,    29,    27,    26,    24,    16,    19
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
@@ -542,19 +543,19 @@ static const yytype_int8 yydefgoto[] =
 #define YYPACT_NINF -15
 static const yytype_int8 yypact[] =
 {
-       1,    -4,    -9,   -15,    -1,    10,    22,     3,   -15,    18,
-     -15,   -15,    11,   -15,    11,    11,    11,    25,    13,   -15,
-     -15,    13,    23,    20,    14,   -15,     1,   -15,   -15,   -15,
-     -15,   -15,   -15,   -15,    15,    16,     6,   -15,     8,   -15,
-      21,    24,   -15,   -15,    34,     9,    13,   -15,   -15,    28,
-      11,   -15,   -15,   -15,   -15,   -15,   -15
+       1,    -4,    -9,   -15,     4,     0,    18,     3,   -15,    19,
+     -15,   -15,    14,   -15,    14,    14,    14,    27,    17,   -15,
+     -15,    17,    24,    22,    16,   -15,     1,   -15,   -15,   -15,
+     -15,   -15,   -15,   -15,    20,    21,    10,   -15,    13,   -15,
+      25,    26,   -15,   -15,     9,    12,    17,   -15,   -15,    30,
+      14,   -15,   -15,   -15,   -15,   -15,   -15,   -15
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -15,   -15,    17,   -15,   -15,   -15,   -15,   -15,   -15,   -15,
-     -15,    19,    -5,   -14,   -15
+     -15,   -15,    11,   -15,   -15,   -15,   -15,   -15,   -15,   -15,
+     -15,    23,    -8,   -14,   -15
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -564,10 +565,10 @@ static const yytype_int8 yypgoto[] =
 static const yytype_uint8 yytable[] =
 {
       30,    31,    32,    25,     1,     2,     3,    18,     4,    19,
-      42,     5,    52,     6,    17,    21,    53,    22,    26,    34,
-      35,    46,    47,    46,    48,    24,    27,    23,    33,    28,
-      39,    40,    41,    50,    44,    45,    56,    51,    49,    55,
-      38,    54,     0,    43
+      42,     5,    51,     6,    17,    53,    52,    23,    26,    54,
+      21,    24,    22,    34,    35,    46,    47,    27,    46,    48,
+      33,    39,    28,    40,    41,    50,    57,    43,    55,    44,
+      45,    56,    49,     0,    38
 };
 
 #define yypact_value_is_default(yystate) \
@@ -579,10 +580,10 @@ static const yytype_uint8 yytable[] =
 static const yytype_int8 yycheck[] =
 {
       14,    15,    16,     0,     3,     4,     5,    16,     7,    18,
-      24,    10,     3,    12,    18,    16,     7,    18,    15,     6,
-       7,    15,    16,    15,    16,     3,     8,    17,     3,    18,
-       7,    11,    18,     9,    19,    19,    50,     3,    17,    11,
-      21,    46,    -1,    26
+      24,    10,     3,    12,    18,     3,     7,    17,    15,     7,
+      16,     3,    18,     6,     7,    15,    16,     8,    15,    16,
+       3,     7,    18,    11,    18,     9,    50,    26,    46,    19,
+      19,    11,    17,    -1,    21
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -594,7 +595,7 @@ static const yytype_uint8 yystos[] =
       34,    16,    18,    17,     3,     0,    15,     8,    18,    33,
       33,    33,    33,     3,     6,     7,    31,    32,    31,     7,
       11,    18,    33,    22,    19,    19,    15,    16,    16,    17,
-       9,     3,     3,     7,    32,    11,    33
+       9,     3,     7,     3,     7,    32,    11,    33
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -1654,7 +1655,7 @@ yyreduce:
     {
 	struct parse_events__term *term;
 
-	ABORT_ON(parse_events__new_term(&term, (yyvsp[(1) - (3)].num), NULL, NULL, (yyvsp[(3) - (3)].num)));
+	ABORT_ON(parse_events__new_term(&term, (yyvsp[(1) - (3)].num), NULL, (yyvsp[(3) - (3)].str), 0));
 	(yyval.term) = term;
 }
     break;
@@ -1666,6 +1667,18 @@ yyreduce:
     {
 	struct parse_events__term *term;
 
+	ABORT_ON(parse_events__new_term(&term, (yyvsp[(1) - (3)].num), NULL, NULL, (yyvsp[(3) - (3)].num)));
+	(yyval.term) = term;
+}
+    break;
+
+  case 31:
+
+/* Line 1806 of yacc.c  */
+#line 219 "util/parse-events.y"
+    {
+	struct parse_events__term *term;
+
 	ABORT_ON(parse_events__new_term(&term, (yyvsp[(1) - (1)].num), NULL, NULL, 1));
 	(yyval.term) = term;
 }
@@ -1674,7 +1687,7 @@ yyreduce:
 
 
 /* Line 1806 of yacc.c  */
-#line 1678 "util/parse-events-bison.c"
+#line 1691 "util/parse-events-bison.c"
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -1905,7 +1918,7 @@ yyreturn:
 
 
 /* Line 2067 of yacc.c  */
-#line 222 "util/parse-events.y"
+#line 230 "util/parse-events.y"
 
 
 void parse_events_error(struct list_head *list_all __used,
diff --git a/tools/perf/util/parse-events-flex.c b/tools/perf/util/parse-events-flex.c
index 34cfc85..4c0e355 100644
--- a/tools/perf/util/parse-events-flex.c
+++ b/tools/perf/util/parse-events-flex.c
@@ -378,8 +378,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 49
-#define YY_END_OF_BUFFER 50
+#define YY_NUM_RULES 50
+#define YY_END_OF_BUFFER 51
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -387,56 +387,57 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[440] =
+static yyconst flex_int16_t yy_accept[443] =
     {   0,
-        0,    0,   50,   49,   43,   46,   45,   44,   39,   39,
-       47,   48,   43,   43,   43,   43,   43,   43,   43,   43,
-       43,   43,   41,   43,   43,   43,   43,   43,   41,   42,
-       43,   43,   42,   42,   43,   39,    0,   43,   43,   43,
-       21,   43,   43,   43,   43,   43,   43,   43,   43,   43,
-       43,   43,   15,   43,    0,   43,   43,   43,   41,    0,
-       43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
-       43,   43,   43,   38,   38,   43,   43,   43,   43,   40,
-       43,   43,    0,   43,   43,   43,   24,   43,   43,   43,
-       43,   43,   43,    0,   43,   43,   43,   41,    0,   43,
-
-       43,   43,    0,   19,   20,   43,   43,   43,   43,   43,
-       43,   43,   30,   43,   43,   43,   38,   38,   43,   43,
-       43,   43,   43,   43,   43,    0,    0,   43,   43,   43,
-       43,    0,   43,   43,   43,    0,   43,    0,   22,   43,
-       43,   41,    0,   23,   43,   43,   19,   20,   26,   43,
-       37,   43,   43,   31,   25,   43,   43,   43,   26,   43,
-       43,   43,   43,   43,    0,   43,    0,    0,    0,    0,
-       43,   43,   43,   43,    0,   43,   43,   43,    0,    0,
-       43,   22,   43,   43,   41,   23,    0,   43,   26,   43,
-       43,   43,   43,    0,   43,   43,   43,   43,   27,    0,
-
-       27,    0,   43,    0,    0,    0,    0,   43,   43,   24,
-        0,    0,   32,   43,    0,    0,    0,    1,   43,   12,
-        0,   43,    0,   43,    0,   31,    0,   35,   43,   43,
-       43,    0,    0,   43,    0,    0,    0,   43,   43,    0,
-       43,   43,    0,    0,    0,   33,   34,   43,    0,    0,
-        0,   43,    0,   43,    0,   43,    0,    0,   43,   43,
-       43,    0,   43,    0,    0,    0,   43,   43,    0,    0,
-       43,    7,    0,    0,    0,    0,    0,    0,    0,   43,
-        0,   43,    0,   43,    0,    0,   28,   43,    0,    0,
-       43,    0,   43,    0,    0,   43,    0,    0,    0,    0,
-
-       10,    0,    0,   43,    0,   43,    0,   43,    0,    0,
-       43,   43,    0,    0,   43,    0,    0,    0,    0,   43,
-        9,    0,    0,    0,    1,    0,    0,    0,   43,    0,
-       16,    0,    0,   28,   43,    0,   11,   43,    0,    0,
-        0,    0,   36,    0,    0,    0,    0,    0,    0,   43,
-        0,    0,   12,   43,    0,    0,    0,    0,    0,    0,
-        6,    0,    0,    0,    0,    0,    4,   14,   13,    0,
-        0,    0,    0,    0,    0,    8,    0,    0,    0,    0,
+        0,    0,   51,   50,   44,   47,   46,   45,   40,   40,
+       48,   49,   44,   44,   44,   44,   44,   44,   44,   44,
+       44,   44,   42,   44,   44,   44,   44,   44,   42,   43,
+       44,   44,   43,   43,   44,   40,    0,   44,   44,   44,
+       21,   44,   44,   44,   44,   44,   44,   44,   44,   44,
+       44,   44,   15,   44,    0,   44,   44,   44,   42,    0,
+       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
+       44,   44,   44,   44,   39,   39,   44,   44,   44,   44,
+       41,   44,   44,    0,   44,   44,   44,   24,   44,   44,
+       44,   44,   44,   44,    0,   44,   44,   44,   42,    0,
+
+       44,   44,   44,    0,   19,   20,   44,   44,   44,   44,
+       44,   44,   44,   44,   30,   44,   44,   44,   39,   39,
+       44,   44,   44,   44,   44,   44,   44,    0,    0,   44,
+       44,   44,   44,    0,   44,   44,   44,    0,   44,    0,
+       22,   44,   44,   42,    0,   23,   44,   44,   19,   20,
+       26,   44,   38,   44,   44,   31,   35,   25,   44,   44,
+       44,   26,   44,   44,   44,   44,   44,    0,   44,    0,
+        0,    0,    0,   44,   44,   44,   44,    0,   44,   44,
+       44,    0,    0,   44,   22,   44,   44,   42,   23,    0,
+       44,   26,   44,   44,   44,   44,    0,   44,   44,   44,
+
+       44,   27,    0,   27,    0,   44,    0,    0,    0,    0,
+       44,   44,   24,    0,    0,   32,   44,    0,    0,    0,
+        1,   44,   12,    0,   44,    0,   44,    0,   31,    0,
+       36,   44,   44,   44,    0,    0,   44,    0,    0,    0,
+       44,   44,    0,   44,   44,    0,    0,    0,   33,   34,
+       44,    0,    0,    0,   44,    0,   44,    0,   44,    0,
+        0,   44,   44,   44,    0,   44,    0,    0,    0,   44,
+       44,    0,    0,   44,    7,    0,    0,    0,    0,    0,
+        0,    0,   44,    0,   44,    0,   44,    0,    0,   28,
+       44,    0,    0,   44,    0,   44,    0,    0,   44,    0,
+
+        0,    0,    0,   10,    0,    0,   44,    0,   44,    0,
+       44,    0,    0,   44,   44,    0,    0,   44,    0,    0,
+        0,    0,   44,    9,    0,    0,    0,    1,    0,    0,
+        0,   44,    0,   16,    0,    0,   28,   44,    0,   11,
+       44,    0,    0,    0,    0,   37,    0,    0,    0,    0,
+        0,    0,   44,    0,    0,   12,   44,    0,    0,    0,
+        0,    0,    0,    6,    0,    0,    0,    0,    0,    4,
+       14,   13,    0,    0,    0,    0,    0,    0,    8,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-       16,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,   16,    0,    0,    0,    0,    0,    0,
 
-        0,    0,    0,    0,    0,    0,    0,   17,    0,    5,
-       15,   18,    0,    0,   29,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    7,    3,    0,
-        0,    0,    2,    0,    0,    0,    0,    0,    0
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+       17,    0,    5,   15,   18,    0,    0,   29,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        7,    3,    0,    0,    0,    2,    0,    0,    0,    0,
+        0,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -480,113 +481,113 @@ static yyconst flex_int32_t yy_meta[45] =
         2,    2,    2,    2
     } ;
 
-static yyconst flex_int16_t yy_base[442] =
+static yyconst flex_int16_t yy_base[445] =
     {   0,
-        0,    0,  510,  511,    0,  511,  511,  511,   39,   43,
-      511,  511,  488,  474,   46,  482,   32,   20,   37,   57,
-      473,  484,   34,   64,   59,   64,  469,  467,   78,  113,
-       41,  481,  464,    0,    0,  104,    0,  461,  461,  494,
-        0,  483,  470,  472,  465,   44,  472,  470,  453,  467,
-      455,  448,    0,  464,  447,  468,  444,  443,   64,  443,
-      464,  448,  441,   67,  457,  447,  443,   52,  451,  436,
-      446,  435,  446,  445,   76,  444,   95,  430,  438,    0,
-      445,  426,  100,  439,  438,  435,    0,  427,  456,  431,
-      105,  454,  425,  424,  442,  422,  421,  112,  420,  438,
-
-      425,  410,  117,    0,    0,  424,  412,  436,  408,  409,
-      405,  417,    0,  416,  411,  413,   83,  107,  415,  405,
-      399,  404,  395,  429,  395,  126,  119,  394,  392,  395,
-      405,  404,  401,  396,  399,  100,  398,  400,    0,  400,
-      381,  123,  397,    0,  414,  380,  511,  511,  378,  378,
-      511,  393,  376,  387,    0,  407,  375,  384,  383,  367,
-      374,  380,  400,  378,  383,  361,  361,  378,  377,  359,
-      371,  357,  361,  365,  348,  387,  363,  346,   73,  359,
-      349,  511,  347,  347,    0,  511,  361,  343,    0,  378,
-      342,  376,  341,  352,  353,  337,  343,  349,  335,  349,
-
-        0,  354,  347,  348,  345,  344,  327,  331,  339,  146,
-      340,  123,  150,  323,  326,  337,  332,    0,  329,    0,
-      313,  333,  329,  325,  327,    0,  331,    0,  328,  329,
-      325,  316,  334,  307,  317,  316,  306,  319,  307,  132,
-      301,  301,  306,  308,  311,    0,    0,  331,  311,  301,
-      295,  296,  307,  290,  307,  292,  305,  285,  296,  284,
-      318,  286,  291,  294,  293,  277,  291,  276,  280,  284,
-      268,    0,  286,  272,  283,  270,  276,  281,  284,  270,
-      271,  273,  261,  266,  259,  266,  272,  267,  272,  271,
-      258,  269,  287,  252,  251,  252,  249,  248,  260,  242,
-
-      511,  245,  243,  277,  255,  244,  246,  239,  244,  236,
-      236,  232,  228,  240,  236,  230,  242,  228,  228,  240,
-      511,  239,  226,  233,  511,  232,  234,  221,  224,  218,
-        0,  217,  217,    0,  229,  230,  511,  248,  222,  229,
-      212,  223,    0,  209,  221,  206,  209,  222,  238,  203,
-      202,  201,  511,  234,  205,  217,  200,  194,  193,  194,
-      511,  197,  207,  195,  188,  142,    0,  511,  511,  130,
-      202,  209,  191,  192,  200,  511,  199,  193,  182,  187,
-      197,  180,  181,  190,  176,  200,  173,  172,  185,  184,
-      511,  169,  184,  171,  184,  183,  199,  164,  172,  162,
-
-      161,  160,  166,  162,  171,  170,  147,  511,  158,  511,
-      511,  511,  167,  152,  511,  169,  152,  154,  153,  161,
-      162,  149,  145,  158,  147,  149,  145,  511,  511,  154,
-      152,  137,  511,  138,  145,  131,   53,   54,  511,  172,
-       66
+        0,    0,  513,  514,    0,  514,  514,  514,   39,   43,
+      514,  514,  491,  477,   46,  485,   32,   20,   37,   57,
+      476,  487,   34,   64,   59,   64,   56,  471,   78,  113,
+       48,  485,  468,    0,    0,  104,    0,  465,  465,  498,
+        0,  487,  474,  476,  469,   46,  476,  474,  457,  471,
+      459,  452,    0,  468,  451,  472,  448,  447,   64,  447,
+      468,  452,  445,  119,  461,  451,  447,   63,  446,  454,
+      439,  449,  438,  449,  448,  119,  447,   81,  433,  441,
+        0,  448,  429,  100,  442,  441,  438,    0,  430,  459,
+      434,   41,  457,  428,  427,  445,  425,  424,  118,  423,
+
+      441,  428,  413,  118,    0,    0,  427,  415,  439,  411,
+      412,  408,  420,  419,    0,  418,  413,  415,   54,   92,
+      417,  407,  401,  406,  397,  431,  397,   84,  118,  396,
+      394,  397,  407,  406,  403,  398,  401,  127,  400,  402,
+        0,  402,  383,  125,  399,    0,  416,  382,  514,  514,
+      380,  380,  514,  395,  378,  389,    0,    0,  409,  377,
+      386,  385,  369,  376,  382,  402,  380,  385,  363,  363,
+      380,  379,  361,  373,  359,  363,  367,  350,  389,  365,
+      348,   64,  361,  351,  514,  349,  349,    0,  514,  363,
+      345,    0,  380,  344,  378,  343,  354,  355,  339,  345,
+
+      351,  337,  351,    0,  356,  349,  350,  347,  346,  329,
+      333,  341,  147,  342,  122,  124,  325,  328,  339,  334,
+        0,  331,    0,  315,  335,  331,  327,  329,    0,  333,
+        0,  330,  331,  327,  318,  336,  309,  319,  318,  308,
+      321,  309,  133,  303,  303,  308,  310,  313,    0,    0,
+      333,  313,  303,  297,  298,  309,  292,  309,  294,  307,
+      287,  298,  286,  320,  288,  293,  296,  295,  279,  293,
+      278,  282,  286,  270,    0,  288,  274,  285,  272,  278,
+      283,  286,  272,  273,  275,  263,  268,  261,  268,  274,
+      269,  274,  273,  260,  271,  289,  254,  253,  254,  251,
+
+      250,  262,  244,  514,  247,  245,  279,  257,  246,  248,
+      241,  246,  238,  238,  234,  230,  242,  238,  232,  244,
+      230,  230,  242,  514,  241,  228,  235,  514,  234,  236,
+      223,  226,  220,    0,  219,  219,    0,  231,  232,  514,
+      250,  224,  231,  214,  225,    0,  211,  223,  208,  211,
+      224,  240,  205,  204,  203,  514,  236,  207,  219,  202,
+      196,  195,  196,  514,  199,  209,  197,  190,  142,    0,
+      514,  514,  137,  204,  211,  193,  194,  202,  514,  201,
+      195,  184,  189,  199,  182,  183,  192,  178,  202,  175,
+      174,  187,  186,  514,  171,  186,  173,  186,  185,  201,
+
+      166,  174,  164,  163,  162,  168,  164,  173,  172,  149,
+      514,  160,  514,  514,  514,  169,  154,  514,  171,  154,
+      156,  155,  163,  164,  151,  147,  160,  149,  151,  147,
+      514,  514,  156,  154,  139,  514,  139,  145,  139,  123,
+      109,  514,  174,   68
     } ;
 
-static yyconst flex_int16_t yy_def[442] =
+static yyconst flex_int16_t yy_def[445] =
     {   0,
-      439,    1,  439,  439,  440,  439,  439,  439,  439,  439,
-      439,  439,  440,  440,  440,  440,  440,  440,  440,  440,
-      440,  440,  440,  440,  440,  440,  440,  440,  440,  440,
-      440,  440,  440,  440,  440,  439,  441,  440,  440,  440,
-      440,  440,  440,  440,  440,  440,  440,  440,  440,  440,
-      440,  440,  440,  440,  439,  440,  440,  440,  440,  439,
-      440,  440,  440,  440,  440,  440,  440,  440,  440,  440,
-      440,  440,  440,   30,   30,  440,  440,  440,  440,  441,
-      440,  440,  439,  440,  440,  440,  440,  440,  440,  440,
-      440,  440,  440,  439,  440,  440,  440,  440,  439,  440,
-
-      440,  440,  439,  440,  440,  440,  440,  440,  440,  440,
-      440,  440,  440,  440,  440,  440,   30,   30,  440,  440,
-      440,  440,  440,  440,  440,  439,  439,  440,  440,  440,
-      440,  439,  440,  440,  440,  439,  440,  439,  440,  440,
-      440,  440,  439,  440,  440,  440,  439,  439,  440,  440,
-      439,  440,  440,  440,  440,  440,  440,  440,   30,  440,
-      440,  440,  440,  440,  439,  440,  439,  439,  439,  439,
-      440,  440,  440,  440,  439,  440,  440,  440,  439,  439,
-      440,  439,  440,  440,  440,  439,  439,  440,  440,  440,
-      440,  440,  440,  439,  440,  440,  440,  440,  440,  439,
-
-      440,  439,  440,  439,  439,  439,  439,  440,  440,  440,
-      439,  439,  440,  440,  439,  439,  439,  440,  440,  440,
-      439,  440,  439,  440,  439,  440,  439,  440,  440,  440,
-      440,  439,  439,  440,  439,  439,  439,  440,  440,  439,
-      440,  440,  439,  439,  439,  440,  440,  440,  439,  439,
-      439,  440,  439,  440,  439,  440,  439,  439,  440,  440,
-      440,  439,  440,  439,  439,  439,  440,  440,  439,  439,
-      440,  440,  439,  439,  439,  439,  439,  439,  439,  440,
-      439,  440,  439,  440,  439,  439,  440,  440,  439,  439,
-      440,  439,  440,  439,  439,  440,  439,  439,  439,  439,
-
-      439,  439,  439,  440,  439,  440,  439,  440,  439,  439,
-      440,  440,  439,  439,  440,  439,  439,  439,  439,  440,
-      439,  439,  439,  439,  439,  439,  439,  439,  440,  439,
-      440,  439,  439,  440,  440,  439,  439,  440,  439,  439,
-      439,  439,  440,  439,  439,  439,  439,  439,  439,  440,
-      439,  439,  439,  440,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  440,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,    0,  439,
-      439
+      442,    1,  442,  442,  443,  442,  442,  442,  442,  442,
+      442,  442,  443,  443,  443,  443,  443,  443,  443,  443,
+      443,  443,  443,  443,  443,  443,  443,  443,  443,  443,
+      443,  443,  443,  443,  443,  442,  444,  443,  443,  443,
+      443,  443,  443,  443,  443,  443,  443,  443,  443,  443,
+      443,  443,  443,  443,  442,  443,  443,  443,  443,  442,
+      443,  443,  443,  443,  443,  443,  443,  443,  443,  443,
+      443,  443,  443,  443,   30,   30,  443,  443,  443,  443,
+      444,  443,  443,  442,  443,  443,  443,  443,  443,  443,
+      443,  443,  443,  443,  442,  443,  443,  443,  443,  442,
+
+      443,  443,  443,  442,  443,  443,  443,  443,  443,  443,
+      443,  443,  443,  443,  443,  443,  443,  443,   30,   30,
+      443,  443,  443,  443,  443,  443,  443,  442,  442,  443,
+      443,  443,  443,  442,  443,  443,  443,  442,  443,  442,
+      443,  443,  443,  443,  442,  443,  443,  443,  442,  442,
+      443,  443,  442,  443,  443,  443,  443,  443,  443,  443,
+      443,   30,  443,  443,  443,  443,  443,  442,  443,  442,
+      442,  442,  442,  443,  443,  443,  443,  442,  443,  443,
+      443,  442,  442,  443,  442,  443,  443,  443,  442,  442,
+      443,  443,  443,  443,  443,  443,  442,  443,  443,  443,
+
+      443,  443,  442,  443,  442,  443,  442,  442,  442,  442,
+      443,  443,  443,  442,  442,  443,  443,  442,  442,  442,
+      443,  443,  443,  442,  443,  442,  443,  442,  443,  442,
+      443,  443,  443,  443,  442,  442,  443,  442,  442,  442,
+      443,  443,  442,  443,  443,  442,  442,  442,  443,  443,
+      443,  442,  442,  442,  443,  442,  443,  442,  443,  442,
+      442,  443,  443,  443,  442,  443,  442,  442,  442,  443,
+      443,  442,  442,  443,  443,  442,  442,  442,  442,  442,
+      442,  442,  443,  442,  443,  442,  443,  442,  442,  443,
+      443,  442,  442,  443,  442,  443,  442,  442,  443,  442,
+
+      442,  442,  442,  442,  442,  442,  443,  442,  443,  442,
+      443,  442,  442,  443,  443,  442,  442,  443,  442,  442,
+      442,  442,  443,  442,  442,  442,  442,  442,  442,  442,
+      442,  443,  442,  443,  442,  442,  443,  443,  442,  442,
+      443,  442,  442,  442,  442,  443,  442,  442,  442,  442,
+      442,  442,  443,  442,  442,  442,  443,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  443,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,    0,  442,  442
     } ;
 
-static yyconst flex_int16_t yy_nxt[556] =
+static yyconst flex_int16_t yy_nxt[559] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   10,   10,   11,
        12,    5,    5,    5,   13,   14,   15,   16,    5,    5,
@@ -594,64 +595,64 @@ static yyconst flex_int16_t yy_nxt[556] =
        23,   25,   26,   27,   28,   29,   30,   31,   32,   23,
         5,   33,   34,    5,   36,   36,   36,   36,   36,   36,
        36,   36,   40,   41,   44,   46,   47,   50,   48,   49,
-       55,   59,   42,   45,   59,   64,   87,   60,   80,   59,
-      103,   51,   52,   59,   53,   56,   76,  433,  109,   77,
-       54,   37,   61,   87,   66,  110,  438,   62,   67,  111,
-      104,   98,   68,   65,   98,  105,  117,   63,   71,   98,
-
-       74,  118,   72,   98,  215,   59,  159,   74,   59,   36,
-       36,   36,   36,   59,   73,  120,  216,   59,   74,   74,
-       74,   74,  179,  126,   74,   74,   74,   74,  127,  121,
-      134,   74,  180,   74,   74,   74,   74,   75,   74,  142,
-      147,  169,  142,  135,  113,  148,  167,  142,  168,  240,
-      185,  142,  170,  185,  429,  244,  246,  247,  185,  245,
-      269,  383,  185,  381,  270,  241,  384,  382,  416,  437,
-      242,  436,  417,   35,   35,  435,  434,  433,  432,  431,
-      430,  429,  428,  427,  426,  425,  424,  423,  422,  421,
-      420,  419,  418,  415,  415,  414,  413,  412,  411,  410,
-
-      409,  408,  407,  406,  405,  404,  403,  402,  401,  400,
-      399,  398,  186,  397,  396,  395,  394,  393,  392,  391,
-      390,  389,  388,  387,  148,  386,  385,  380,  379,  378,
-      377,  376,  375,  374,  373,  372,  371,  370,  369,  368,
-      367,  366,  365,  364,  363,  362,  361,  360,  359,  358,
-      357,  356,  355,  354,  353,  352,  351,  350,  349,  348,
-      347,  346,  345,  344,  343,  342,  341,  340,  339,  338,
-      337,  336,  335,  334,  333,  332,  331,  330,  329,  328,
-      327,  326,  325,  324,  323,  322,  321,  320,  319,  318,
-      317,  316,  315,  314,  313,  312,  311,  310,  309,  308,
-
-      307,  306,  305,  304,  303,  302,  301,  300,  299,  298,
-      297,  296,  295,  294,  293,  113,  292,  148,  147,  291,
-      290,  289,  288,  287,  286,  285,  284,  283,  282,  281,
-      280,  279,  278,  277,  276,  275,  274,  273,  272,  271,
-      268,  267,  266,  265,  264,  263,  182,  262,  261,  260,
-      259,  258,  257,  256,  255,  254,  253,  252,  251,  250,
-      249,  248,  243,  239,  238,  237,  236,  235,  147,  234,
-      233,  232,  201,  231,  230,  229,  228,  227,  226,  225,
-      224,  223,  222,  221,  220,  219,  218,  217,  214,  213,
-      212,  211,  210,  209,  113,  208,  207,  206,  205,  204,
-
-      203,  202,  201,  200,  199,  198,  197,   74,  196,  195,
-      194,  193,  192,  191,  190,  189,  188,  187,  186,  184,
-      183,  182,  181,  178,  177,  176,  175,  174,  173,  172,
-      171,  166,  165,  164,  163,  162,  161,  160,  158,  157,
-      156,  155,  154,  153,  152,  151,  150,  149,  146,  145,
-      144,  143,  141,  140,  139,  138,  137,  136,  133,  132,
-      131,  130,  129,  128,  125,  124,  123,  122,  119,   74,
-      116,  115,  114,  113,  112,  108,  107,  106,  102,  101,
-      100,   99,   97,   96,   95,   94,   93,   92,   91,   90,
-       89,   87,   88,   86,   85,   84,   41,   83,   82,   81,
-
-       79,   78,   70,   69,   58,   57,   43,   39,   38,  439,
-        3,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439
+       55,   59,   42,   45,   59,   64,  136,   60,   88,   59,
+       81,   51,   52,   59,   53,   56,   69,  162,   75,  137,
+       54,   37,   61,   77,   66,   88,   78,   62,   67,  110,
+       70,   99,   68,   65,   99,  218,  111,   63,   72,   99,
+
+      112,  122,   73,   99,  170,   59,  171,  219,   59,   36,
+       36,   36,   36,   59,   74,  123,   75,   59,   75,   75,
+       75,   75,  104,  128,   75,   75,   75,   75,  129,  115,
+      249,  250,  436,   75,   75,   75,   75,   76,   75,  119,
+      172,  149,  105,   75,  120,  144,  150,  106,  144,  182,
+      243,  173,  188,  144,  247,  188,  441,  144,  248,  183,
+      188,  272,  432,  384,  188,  273,  244,  385,  386,  440,
+      419,  245,  439,  387,  420,   35,   35,  438,  437,  436,
+      435,  434,  433,  432,  431,  430,  429,  428,  427,  426,
+      425,  424,  423,  422,  421,  418,  418,  417,  416,  415,
+
+      414,  413,  412,  411,  410,  409,  408,  407,  406,  405,
+      404,  403,  402,  401,  189,  400,  399,  398,  397,  396,
+      395,  394,  393,  392,  391,  390,  150,  389,  388,  383,
+      382,  381,  380,  379,  378,  377,  376,  375,  374,  373,
+      372,  371,  370,  369,  368,  367,  366,  365,  364,  363,
+      362,  361,  360,  359,  358,  357,  356,  355,  354,  353,
+      352,  351,  350,  349,  348,  347,  346,  345,  344,  343,
+      342,  341,  340,  339,  338,  337,  336,  335,  334,  333,
+      332,  331,  330,  329,  328,  327,  326,  325,  324,  323,
+      322,  321,  320,  319,  318,  317,  316,  315,  314,  313,
+
+      312,  311,  310,  309,  308,  307,  306,  305,  304,  303,
+      302,  301,  300,  299,  298,  297,  296,  115,  295,  150,
+      149,  294,  293,  292,  291,  290,  289,  288,  287,  286,
+      285,  284,  283,  282,  281,  280,  279,  278,  277,  276,
+      275,  274,  271,  270,  269,  268,  267,  266,  185,  265,
+      264,  263,  262,  261,  260,  259,  258,  257,  256,  255,
+      254,  253,  252,  251,  246,  242,  241,  240,  239,  238,
+      149,  237,  236,  235,  204,  234,  233,  232,  231,  230,
+      229,  228,  227,  226,  225,  224,  223,  222,  221,  220,
+      217,  216,  215,  214,  213,  212,  115,  211,  210,  209,
+
+      208,  207,  206,  205,  204,  203,  202,  201,  200,   75,
+      199,  198,  197,  196,  195,  194,  193,  192,  191,  190,
+      189,  187,  186,  185,  184,  181,  180,  179,  178,  177,
+      176,  175,  174,  169,  168,  167,  166,  165,  164,  163,
+      161,  160,  159,  158,  157,  156,  155,  154,  153,  152,
+      151,  148,  147,  146,  145,  143,  142,  141,  140,  139,
+      138,  135,  134,  133,  132,  131,  130,  127,  126,  125,
+      124,  121,   75,  118,  117,  116,  115,  114,  113,  109,
+      108,  107,  103,  102,  101,  100,   98,   97,   96,   95,
+       94,   93,   92,   91,   90,   88,   89,   87,   86,   85,
+
+       41,   84,   83,   82,   80,   79,   71,   58,   57,   43,
+       39,   38,  442,    3,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442
     } ;
 
-static yyconst flex_int16_t yy_chk[556] =
+static yyconst flex_int16_t yy_chk[559] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -659,61 +660,61 @@ static yyconst flex_int16_t yy_chk[556] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    9,    9,    9,    9,   10,   10,
        10,   10,   15,   15,   17,   18,   18,   19,   18,   18,
-       20,   23,   15,   17,   23,   25,   46,   24,  441,   23,
-       64,   19,   19,   23,   19,   20,   31,  438,   68,   31,
-       19,    9,   24,   46,   26,   68,  437,   24,   26,   68,
-       64,   59,   26,   25,   59,   64,   75,   24,   29,   59,
-
-       75,   75,   29,   59,  179,   29,  117,  117,   29,   36,
-       36,   36,   36,   29,   29,   77,  179,   29,   30,   30,
-       30,   30,  136,   83,   30,   30,   30,   30,   83,   77,
-       91,  118,  136,   30,   30,   30,   30,   30,   30,   98,
-      103,  127,   98,   91,  118,  103,  126,   98,  126,  210,
-      142,   98,  127,  142,  436,  212,  213,  213,  142,  212,
-      240,  370,  142,  366,  240,  210,  370,  366,  407,  435,
-      210,  434,  407,  440,  440,  432,  431,  430,  427,  426,
-      425,  424,  423,  422,  421,  420,  419,  418,  417,  416,
-      414,  413,  409,  406,  405,  404,  403,  402,  401,  400,
-
-      399,  398,  397,  396,  395,  394,  393,  392,  390,  389,
-      388,  387,  386,  385,  384,  383,  382,  381,  380,  379,
-      378,  377,  375,  374,  373,  372,  371,  365,  364,  363,
-      362,  360,  359,  358,  357,  356,  355,  354,  352,  351,
-      350,  349,  348,  347,  346,  345,  344,  342,  341,  340,
-      339,  338,  336,  335,  333,  332,  330,  329,  328,  327,
-      326,  324,  323,  322,  320,  319,  318,  317,  316,  315,
-      314,  313,  312,  311,  310,  309,  308,  307,  306,  305,
-      304,  303,  302,  300,  299,  298,  297,  296,  295,  294,
-      293,  292,  291,  290,  289,  288,  287,  286,  285,  284,
-
-      283,  282,  281,  280,  279,  278,  277,  276,  275,  274,
-      273,  271,  270,  269,  268,  267,  266,  265,  264,  263,
-      262,  261,  260,  259,  258,  257,  256,  255,  254,  253,
-      252,  251,  250,  249,  248,  245,  244,  243,  242,  241,
-      239,  238,  237,  236,  235,  234,  233,  232,  231,  230,
-      229,  227,  225,  224,  223,  222,  221,  219,  217,  216,
-      215,  214,  211,  209,  208,  207,  206,  205,  204,  203,
-      202,  200,  199,  198,  197,  196,  195,  194,  193,  192,
-      191,  190,  188,  187,  184,  183,  181,  180,  178,  177,
-      176,  175,  174,  173,  172,  171,  170,  169,  168,  167,
-
-      166,  165,  164,  163,  162,  161,  160,  159,  158,  157,
-      156,  154,  153,  152,  150,  149,  146,  145,  143,  141,
-      140,  138,  137,  135,  134,  133,  132,  131,  130,  129,
-      128,  125,  124,  123,  122,  121,  120,  119,  116,  115,
-      114,  112,  111,  110,  109,  108,  107,  106,  102,  101,
-      100,   99,   97,   96,   95,   94,   93,   92,   90,   89,
-       88,   86,   85,   84,   82,   81,   79,   78,   76,   74,
-       73,   72,   71,   70,   69,   67,   66,   65,   63,   62,
-       61,   60,   58,   57,   56,   55,   54,   52,   51,   50,
-       49,   48,   47,   45,   44,   43,   42,   40,   39,   38,
-
-       33,   32,   28,   27,   22,   21,   16,   14,   13,    3,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-      439,  439,  439,  439,  439
+       20,   23,   15,   17,   23,   25,   92,   24,   46,   23,
+      444,   19,   19,   23,   19,   20,   27,  119,  119,   92,
+       19,    9,   24,   31,   26,   46,   31,   24,   26,   68,
+       27,   59,   26,   25,   59,  182,   68,   24,   29,   59,
+
+       68,   78,   29,   59,  128,   29,  128,  182,   29,   36,
+       36,   36,   36,   29,   29,   78,  120,   29,   30,   30,
+       30,   30,   64,   84,   30,   30,   30,   30,   84,  120,
+      216,  216,  441,   30,   30,   30,   30,   30,   30,   76,
+      129,  104,   64,   76,   76,   99,  104,   64,   99,  138,
+      213,  129,  144,   99,  215,  144,  440,   99,  215,  138,
+      144,  243,  439,  369,  144,  243,  213,  369,  373,  438,
+      410,  213,  437,  373,  410,  443,  443,  435,  434,  433,
+      430,  429,  428,  427,  426,  425,  424,  423,  422,  421,
+      420,  419,  417,  416,  412,  409,  408,  407,  406,  405,
+
+      404,  403,  402,  401,  400,  399,  398,  397,  396,  395,
+      393,  392,  391,  390,  389,  388,  387,  386,  385,  384,
+      383,  382,  381,  380,  378,  377,  376,  375,  374,  368,
+      367,  366,  365,  363,  362,  361,  360,  359,  358,  357,
+      355,  354,  353,  352,  351,  350,  349,  348,  347,  345,
+      344,  343,  342,  341,  339,  338,  336,  335,  333,  332,
+      331,  330,  329,  327,  326,  325,  323,  322,  321,  320,
+      319,  318,  317,  316,  315,  314,  313,  312,  311,  310,
+      309,  308,  307,  306,  305,  303,  302,  301,  300,  299,
+      298,  297,  296,  295,  294,  293,  292,  291,  290,  289,
+
+      288,  287,  286,  285,  284,  283,  282,  281,  280,  279,
+      278,  277,  276,  274,  273,  272,  271,  270,  269,  268,
+      267,  266,  265,  264,  263,  262,  261,  260,  259,  258,
+      257,  256,  255,  254,  253,  252,  251,  248,  247,  246,
+      245,  244,  242,  241,  240,  239,  238,  237,  236,  235,
+      234,  233,  232,  230,  228,  227,  226,  225,  224,  222,
+      220,  219,  218,  217,  214,  212,  211,  210,  209,  208,
+      207,  206,  205,  203,  202,  201,  200,  199,  198,  197,
+      196,  195,  194,  193,  191,  190,  187,  186,  184,  183,
+      181,  180,  179,  178,  177,  176,  175,  174,  173,  172,
+
+      171,  170,  169,  168,  167,  166,  165,  164,  163,  162,
+      161,  160,  159,  156,  155,  154,  152,  151,  148,  147,
+      145,  143,  142,  140,  139,  137,  136,  135,  134,  133,
+      132,  131,  130,  127,  126,  125,  124,  123,  122,  121,
+      118,  117,  116,  114,  113,  112,  111,  110,  109,  108,
+      107,  103,  102,  101,  100,   98,   97,   96,   95,   94,
+       93,   91,   90,   89,   87,   86,   85,   83,   82,   80,
+       79,   77,   75,   74,   73,   72,   71,   70,   69,   67,
+       66,   65,   63,   62,   61,   60,   58,   57,   56,   55,
+       54,   52,   51,   50,   49,   48,   47,   45,   44,   43,
+
+       42,   40,   39,   38,   33,   32,   28,   22,   21,   16,
+       14,   13,    3,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442,  442,  442,
+      442,  442,  442,  442,  442,  442,  442,  442
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -778,7 +779,7 @@ static int term(int type)
 	return PE_TERM;
 }
 
-#line 782 "<stdout>"
+#line 783 "<stdout>"
 
 #define INITIAL 0
 
@@ -962,7 +963,7 @@ YY_DECL
     
 #line 60 "util/parse-events.l"
 
-#line 966 "<stdout>"
+#line 967 "<stdout>"
 
 	if ( !(yy_init) )
 		{
@@ -1015,13 +1016,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 440 )
+				if ( yy_current_state >= 443 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 511 );
+		while ( yy_base[yy_current_state] != 514 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1191,79 +1192,84 @@ YY_RULE_SETUP
 case 35:
 YY_RULE_SETUP
 #line 104 "util/parse-events.l"
-{ return term(PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD); }
+{ return term(PARSE_EVENTS__TERM_TYPE_NAME); }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 105 "util/parse-events.l"
-{ return term(PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
+{ return term(PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD); }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 107 "util/parse-events.l"
-{ return PE_PREFIX_MEM; }
+#line 106 "util/parse-events.l"
+{ return term(PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 108 "util/parse-events.l"
-{ return raw(); }
+{ return PE_PREFIX_MEM; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 109 "util/parse-events.l"
-{ return value(10); }
+{ return raw(); }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 110 "util/parse-events.l"
-{ return value(16); }
+{ return value(10); }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 112 "util/parse-events.l"
-{ return str(PE_MODIFIER_EVENT); }
+#line 111 "util/parse-events.l"
+{ return value(16); }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 113 "util/parse-events.l"
-{ return str(PE_MODIFIER_BP); }
+{ return str(PE_MODIFIER_EVENT); }
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 114 "util/parse-events.l"
-{ return str(PE_NAME); }
+{ return str(PE_MODIFIER_BP); }
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 115 "util/parse-events.l"
-{ return '/'; }
+{ return str(PE_NAME); }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
 #line 116 "util/parse-events.l"
-{ return '-'; }
+{ return '/'; }
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 117 "util/parse-events.l"
-{ return ','; }
+{ return '-'; }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 118 "util/parse-events.l"
-{ return ':'; }
+{ return ','; }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 119 "util/parse-events.l"
-{ return '='; }
+{ return ':'; }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 121 "util/parse-events.l"
+#line 120 "util/parse-events.l"
+{ return '='; }
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 122 "util/parse-events.l"
 ECHO;
 	YY_BREAK
-#line 1267 "<stdout>"
+#line 1273 "<stdout>"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1555,7 +1561,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 440 )
+			if ( yy_current_state >= 443 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1583,11 +1589,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 440 )
+		if ( yy_current_state >= 443 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 439);
+	yy_is_jam = (yy_current_state == 442);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2261,7 +2267,7 @@ void parse_events_free (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 121 "util/parse-events.l"
+#line 122 "util/parse-events.l"
 
 
 
diff --git a/tools/perf/util/parse-events-flex.h b/tools/perf/util/parse-events-flex.h
index ceb9b20..413aebb 100644
--- a/tools/perf/util/parse-events-flex.h
+++ b/tools/perf/util/parse-events-flex.h
@@ -308,7 +308,7 @@ extern int parse_events_lex (void);
 #undef YY_DECL
 #endif
 
-#line 121 "util/parse-events.l"
+#line 122 "util/parse-events.l"
 
 
 #line 315 "util/parse-events-flex.h"
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 5b3a0ef..3e40c6b 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -669,7 +669,9 @@ int parse_events_add_pmu(struct list_head *list, int *idx,
 	if (perf_pmu__config(pmu, &attr, head_config))
 		return -EINVAL;
 
-	return add_event(list, idx, &attr, (char *) "pmu");
+	name = perf_pmu__event_name(name, head_config);
+
+	return add_event(list, idx, &attr, name);
 }
 
 void parse_events_update_lists(struct list_head *list_event,
@@ -1018,6 +1020,11 @@ int parse_events__is_hardcoded_term(struct parse_events__term *term)
 	return term->type <= PARSE_EVENTS__TERM_TYPE_HARDCODED_MAX;
 }
 
+int parse_events__is_name_term(struct parse_events__term *term)
+{
+	return term->type == PARSE_EVENTS__TERM_TYPE_NAME;
+}
+
 int parse_events__new_term(struct parse_events__term **_term, int type,
 			   char *config, char *str, long num)
 {
@@ -1040,6 +1047,7 @@ int parse_events__new_term(struct parse_events__term **_term, int type,
 	case PARSE_EVENTS__TERM_TYPE_NUM:
 		term->val.num = num;
 		break;
+	case PARSE_EVENTS__TERM_TYPE_NAME:
 	case PARSE_EVENTS__TERM_TYPE_STR:
 		term->val.str = str;
 		break;
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index ca069f8..ae0fe60 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -4,6 +4,7 @@
  * Parse symbolic events/counts passed in as options:
  */
 
+#include <linux/list.h>
 #include "../../../include/linux/perf_event.h"
 
 struct list_head;
@@ -37,6 +38,7 @@ enum {
 	PARSE_EVENTS__TERM_TYPE_CONFIG,
 	PARSE_EVENTS__TERM_TYPE_CONFIG1,
 	PARSE_EVENTS__TERM_TYPE_CONFIG2,
+	PARSE_EVENTS__TERM_TYPE_NAME,
 	PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD,
 	PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE,
 	PARSE_EVENTS__TERM_TYPE_NUM,
@@ -58,6 +60,7 @@ struct parse_events__term {
 };
 
 int parse_events__is_hardcoded_term(struct parse_events__term *term);
+int parse_events__is_name_term(struct parse_events__term *term);
 int parse_events__new_term(struct parse_events__term **term, int type,
 			   char *config, char *str, long num);
 void parse_events__free_terms(struct list_head *terms);
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index ab9eca1..01c3679 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -101,6 +101,7 @@ misses|miss				{ return str(PE_NAME_CACHE_OP_RESULT); }
 config			{ return term(PARSE_EVENTS__TERM_TYPE_CONFIG); }
 config1			{ return term(PARSE_EVENTS__TERM_TYPE_CONFIG1); }
 config2			{ return term(PARSE_EVENTS__TERM_TYPE_CONFIG2); }
+name			{ return term(PARSE_EVENTS__TERM_TYPE_NAME); }
 period			{ return term(PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD); }
 branch_type		{ return term(PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
 
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index d9637da..efa96ce 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -199,6 +199,14 @@ PE_NAME
 	$$ = term;
 }
 |
+PE_TERM '=' PE_NAME
+{
+	struct parse_events__term *term;
+
+	ABORT_ON(parse_events__new_term(&term, $1, NULL, $3, 0));
+	$$ = term;
+}
+|
 PE_TERM '=' PE_VALUE
 {
 	struct parse_events__term *term;
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index cb08a11..7c758ee 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -253,9 +253,9 @@ static int pmu_config_term(struct list_head *formats,
 static int pmu_config(struct list_head *formats, struct perf_event_attr *attr,
 		      struct list_head *head_terms)
 {
-	struct parse_events__term *term, *h;
+	struct parse_events__term *term;
 
-	list_for_each_entry_safe(term, h, head_terms, list)
+	list_for_each_entry(term, head_terms, list)
 		if (pmu_config_term(formats, attr, term))
 			return -EINVAL;
 
@@ -303,6 +303,17 @@ void perf_pmu__set_format(unsigned long *bits, long from, long to)
 		set_bit(b, bits);
 }
 
+char *perf_pmu__event_name(char *name, struct list_head *head_terms)
+{
+	struct parse_events__term *term;
+
+	list_for_each_entry(term, head_terms, list)
+		if (parse_events__is_name_term(term))
+			return term->val.str;
+
+	return name;
+}
+
 /* Simulated format definitions. */
 static struct test_format {
 	const char *name;
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 68c0db9..f602745 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -37,5 +37,7 @@ int perf_pmu__new_format(struct list_head *list, char *name,
 			 int config, unsigned long *bits);
 void perf_pmu__set_format(unsigned long *bits, long from, long to);
 
+char *perf_pmu__event_name(char *name, struct list_head *head_terms);
+
 int perf_pmu__test(void);
 #endif /* __PMU_H */
-- 
1.7.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ