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.l | |
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.l')
-rw-r--r-- | tools/perf/util/parse-events.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l index 384ca74c6b22..e4abdf25d493 100644 --- a/tools/perf/util/parse-events.l +++ b/tools/perf/util/parse-events.l | |||
@@ -15,10 +15,10 @@ YYSTYPE *parse_events_get_lval(yyscan_t yyscanner); | |||
15 | 15 | ||
16 | static int __value(YYSTYPE *yylval, char *str, int base, int token) | 16 | static int __value(YYSTYPE *yylval, char *str, int base, int token) |
17 | { | 17 | { |
18 | long num; | 18 | u64 num; |
19 | 19 | ||
20 | errno = 0; | 20 | errno = 0; |
21 | num = strtoul(str, NULL, base); | 21 | num = strtoull(str, NULL, base); |
22 | if (errno) | 22 | if (errno) |
23 | return PE_ERROR; | 23 | return PE_ERROR; |
24 | 24 | ||