diff options
author | Robert Richter <robert.richter@amd.com> | 2012-08-07 13:43:13 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-08 11:39:56 -0400 |
commit | b527bab59be7ca2154f644fcc4b9e3c267a6d855 (patch) | |
tree | aa4f3ad8b6a925279e128d51cc73bb70b87f8fec /tools/perf/util/parse-events.y | |
parent | 2ede8303db75ead3250f95c3390e6ba200cbe7d4 (diff) |
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.y | 10 |
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 { \ | |||
57 | %union | 57 | %union |
58 | { | 58 | { |
59 | char *str; | 59 | char *str; |
60 | unsigned long num; | 60 | u64 num; |
61 | struct list_head *head; | 61 | struct list_head *head; |
62 | struct parse_events__term *term; | 62 | struct parse_events__term *term; |
63 | } | 63 | } |
@@ -207,7 +207,7 @@ PE_VALUE ':' PE_VALUE | |||
207 | struct parse_events_data__events *data = _data; | 207 | struct parse_events_data__events *data = _data; |
208 | struct list_head *list = NULL; | 208 | struct list_head *list = NULL; |
209 | 209 | ||
210 | ABORT_ON(parse_events_add_numeric(&list, &data->idx, $1, $3, NULL)); | 210 | ABORT_ON(parse_events_add_numeric(&list, &data->idx, (u32)$1, $3, NULL)); |
211 | $$ = list; | 211 | $$ = list; |
212 | } | 212 | } |
213 | 213 | ||
@@ -282,7 +282,7 @@ PE_TERM '=' PE_NAME | |||
282 | { | 282 | { |
283 | struct parse_events__term *term; | 283 | struct parse_events__term *term; |
284 | 284 | ||
285 | ABORT_ON(parse_events__term_str(&term, $1, NULL, $3)); | 285 | ABORT_ON(parse_events__term_str(&term, (int)$1, NULL, $3)); |
286 | $$ = term; | 286 | $$ = term; |
287 | } | 287 | } |
288 | | | 288 | | |
@@ -290,7 +290,7 @@ PE_TERM '=' PE_VALUE | |||
290 | { | 290 | { |
291 | struct parse_events__term *term; | 291 | struct parse_events__term *term; |
292 | 292 | ||
293 | ABORT_ON(parse_events__term_num(&term, $1, NULL, $3)); | 293 | ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, $3)); |
294 | $$ = term; | 294 | $$ = term; |
295 | } | 295 | } |
296 | | | 296 | | |
@@ -298,7 +298,7 @@ PE_TERM | |||
298 | { | 298 | { |
299 | struct parse_events__term *term; | 299 | struct parse_events__term *term; |
300 | 300 | ||
301 | ABORT_ON(parse_events__term_num(&term, $1, NULL, 1)); | 301 | ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, 1)); |
302 | $$ = term; | 302 | $$ = term; |
303 | } | 303 | } |
304 | 304 | ||