summaryrefslogtreecommitdiff
path: root/tools/perf/util/parse-events.y
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2012-08-07 21:43:13 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-08 19:39:56 +0400
commitb527bab59be7ca2154f644fcc4b9e3c267a6d855 (patch)
treeaa4f3ad8b6a925279e128d51cc73bb70b87f8fec /tools/perf/util/parse-events.y
parent2ede8303db75ead3250f95c3390e6ba200cbe7d4 (diff)
downloadlinux-b527bab59be7ca2154f644fcc4b9e3c267a6d855.tar.xz
perf tools: Fix parsing of 64 bit raw config value for 32 bit
perf record fails on 32 bit with: invalid or unsupported event: 'r40000F7E0' Fixing this by parsing 64 bit num values. Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: Ingo Molnar <mingo@kernel.org> Link: http://lkml.kernel.org/r/1344361396-7237-4-git-send-email-robert.richter@amd.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.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 2bc5fbff2b5d..423d33151466 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -57,7 +57,7 @@ do { \
%union
{
char *str;
- unsigned long num;
+ u64 num;
struct list_head *head;
struct parse_events__term *term;
}
@@ -207,7 +207,7 @@ PE_VALUE ':' PE_VALUE
struct parse_events_data__events *data = _data;
struct list_head *list = NULL;
- ABORT_ON(parse_events_add_numeric(&list, &data->idx, $1, $3, NULL));
+ ABORT_ON(parse_events_add_numeric(&list, &data->idx, (u32)$1, $3, NULL));
$$ = list;
}
@@ -282,7 +282,7 @@ PE_TERM '=' PE_NAME
{
struct parse_events__term *term;
- ABORT_ON(parse_events__term_str(&term, $1, NULL, $3));
+ ABORT_ON(parse_events__term_str(&term, (int)$1, NULL, $3));
$$ = term;
}
|
@@ -290,7 +290,7 @@ PE_TERM '=' PE_VALUE
{
struct parse_events__term *term;
- ABORT_ON(parse_events__term_num(&term, $1, NULL, $3));
+ ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, $3));
$$ = term;
}
|
@@ -298,7 +298,7 @@ PE_TERM
{
struct parse_events__term *term;
- ABORT_ON(parse_events__term_num(&term, $1, NULL, 1));
+ ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, 1));
$$ = term;
}