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>
This commit is contained in:
Robert Richter
2012-08-07 19:43:13 +02:00
committed by Arnaldo Carvalho de Melo
parent 2ede8303db
commit b527bab59b
4 changed files with 13 additions and 13 deletions

View File

@@ -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;