diff options
author | Robert Richter <robert.richter@amd.com> | 2012-08-07 19:43:13 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-08 12:39:56 -0300 |
commit | b527bab59be7ca2154f644fcc4b9e3c267a6d855 (patch) | |
tree | aa4f3ad8b6a925279e128d51cc73bb70b87f8fec /tools/perf/util/parse-events.l | |
parent | 2ede8303db75ead3250f95c3390e6ba200cbe7d4 (diff) | |
download | lwn-b527bab59be7ca2154f644fcc4b9e3c267a6d855.tar.gz lwn-b527bab59be7ca2154f644fcc4b9e3c267a6d855.zip |
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); static int __value(YYSTYPE *yylval, char *str, int base, int token) { - long num; + u64 num; errno = 0; - num = strtoul(str, NULL, base); + num = strtoull(str, NULL, base); if (errno) return PE_ERROR; |