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>
This commit is contained in:
Jiri Olsa
2012-04-25 18:24:57 +02:00
committed by Arnaldo Carvalho de Melo
parent a0187060f4
commit 16fa7e8200
4 changed files with 96 additions and 56 deletions

View File

@@ -176,8 +176,8 @@ PE_NAME '=' PE_NAME
{
struct parse_events__term *term;
ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_STR,
$1, $3, 0));
ABORT_ON(parse_events__term_str(&term, PARSE_EVENTS__TERM_TYPE_USER,
$1, $3));
$$ = term;
}
|
@@ -185,8 +185,8 @@ PE_NAME '=' PE_VALUE
{
struct parse_events__term *term;
ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_NUM,
$1, NULL, $3));
ABORT_ON(parse_events__term_num(&term, PARSE_EVENTS__TERM_TYPE_USER,
$1, $3));
$$ = term;
}
|
@@ -194,8 +194,8 @@ PE_NAME
{
struct parse_events__term *term;
ABORT_ON(parse_events__new_term(&term, PARSE_EVENTS__TERM_TYPE_NUM,
$1, NULL, 1));
ABORT_ON(parse_events__term_num(&term, PARSE_EVENTS__TERM_TYPE_USER,
$1, 1));
$$ = term;
}
|
@@ -203,7 +203,7 @@ PE_TERM '=' PE_VALUE
{
struct parse_events__term *term;
ABORT_ON(parse_events__new_term(&term, $1, NULL, NULL, $3));
ABORT_ON(parse_events__term_num(&term, $1, NULL, $3));
$$ = term;
}
|
@@ -211,7 +211,7 @@ PE_TERM
{
struct parse_events__term *term;
ABORT_ON(parse_events__new_term(&term, $1, NULL, NULL, 1));
ABORT_ON(parse_events__term_num(&term, $1, NULL, 1));
$$ = term;
}