aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.y
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-04-25 12:24:57 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-18 11:15:32 -0400
commit16fa7e8200fb9066b77a3f27cbed8e4a9fc71998 (patch)
treed1454e844fe5b40389970995830f6eaabbe51c86 /tools/perf/util/parse-events.y
parenta0187060f4ab68cf1aa533446b906cae5b14eb48 (diff)
perf tools: Split term type into value type and term type
Introducing type_val and type_term for term instead of a single type value. Currently the term type marked out the value type as well. With this change we can have future string term values being specified by user and translated into proper number along the processing. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robert Richter <robert.richter@amd.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1335371102-11358-2-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.y')
-rw-r--r--tools/perf/util/parse-events.y16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index d9637da7333c..936913ea0ab6 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -176,8 +176,8 @@ PE_NAME '=' PE_NAME
176{ 176{
177 struct parse_events__term *term; 177 struct parse_events__term *term;
178 178
179 ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_STR, 179 ABORT_ON(parse_events__term_str(&term, PARSE_EVENTS__TERM_TYPE_USER,
180 $1, $3, 0)); 180 $1, $3));
181 $$ = term; 181 $$ = term;
182} 182}
183| 183|
@@ -185,8 +185,8 @@ PE_NAME '=' PE_VALUE
185{ 185{
186 struct parse_events__term *term; 186 struct parse_events__term *term;
187 187
188 ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_NUM, 188 ABORT_ON(parse_events__term_num(&term, PARSE_EVENTS__TERM_TYPE_USER,
189 $1, NULL, $3)); 189 $1, $3));
190 $$ = term; 190 $$ = term;
191} 191}
192| 192|
@@ -194,8 +194,8 @@ PE_NAME
194{ 194{
195 struct parse_events__term *term; 195 struct parse_events__term *term;
196 196
197 ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_NUM, 197 ABORT_ON(parse_events__term_num(&term, PARSE_EVENTS__TERM_TYPE_USER,
198 $1, NULL, 1)); 198 $1, 1));
199 $$ = term; 199 $$ = term;
200} 200}
201| 201|
@@ -203,7 +203,7 @@ PE_TERM '=' PE_VALUE
203{ 203{
204 struct parse_events__term *term; 204 struct parse_events__term *term;
205 205
206 ABORT_ON(parse_events__new_term(&term, $1, NULL, NULL, $3)); 206 ABORT_ON(parse_events__term_num(&term, $1, NULL, $3));
207 $$ = term; 207 $$ = term;
208} 208}
209| 209|
@@ -211,7 +211,7 @@ PE_TERM
211{ 211{
212 struct parse_events__term *term; 212 struct parse_events__term *term;
213 213
214 ABORT_ON(parse_events__new_term(&term, $1, NULL, NULL, 1)); 214 ABORT_ON(parse_events__term_num(&term, $1, NULL, 1));
215 $$ = term; 215 $$ = term;
216} 216}
217 217