diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-08-14 03:11:34 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-08-17 10:06:21 -0400 |
commit | 3d7245b0946c13a97e3a10213b8fd0152972a0d5 (patch) | |
tree | 0ac8e51036b6f671cb1b0e99c76e4d98c42f47cc /tools/perf/util/annotate.c | |
parent | 7322d6c98dd214252bd697f8dde64a3576977fab (diff) |
perf annotate: Fix 32-bit compilation error in util/annotate.c
Fix the following 32-bit compilation errors:
util/annotate.c: In function ‘addr_map_symbol__account_cycles’:
util/annotate.c:643:3: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘u64’ [-Werror=format=]
pr_debug2("BB with bad start: addr %lx start %lx sym %lx saddr %lx\n",
^
util/annotate.c:643:3: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘u64’ [-Werror=format=]
util/annotate.c:643:3: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘u64’ [-Werror=format=]
These were introduced by the patch:
"perf report: Add infrastructure for a cycles histogram"
Also change the 'saddr' variable from 'unsigned long' to 'u64'
noting that theoretically we could be processing data captured
on a 64-bit machine but processing it on a 32-bit machine.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Fixes: d4957633bf9d ("perf report: Add infrastructure for a cycles histogram")
Link: http://lkml.kernel.org/r/1439536294-18241-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index e0b614648044..8a18347709e1 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -621,7 +621,7 @@ int addr_map_symbol__account_cycles(struct addr_map_symbol *ams, | |||
621 | struct addr_map_symbol *start, | 621 | struct addr_map_symbol *start, |
622 | unsigned cycles) | 622 | unsigned cycles) |
623 | { | 623 | { |
624 | unsigned long saddr = 0; | 624 | u64 saddr = 0; |
625 | int err; | 625 | int err; |
626 | 626 | ||
627 | if (!cycles) | 627 | if (!cycles) |
@@ -640,7 +640,7 @@ int addr_map_symbol__account_cycles(struct addr_map_symbol *ams, | |||
640 | start->addr == ams->sym->start + ams->map->start))) | 640 | start->addr == ams->sym->start + ams->map->start))) |
641 | saddr = start->al_addr; | 641 | saddr = start->al_addr; |
642 | if (saddr == 0) | 642 | if (saddr == 0) |
643 | pr_debug2("BB with bad start: addr %lx start %lx sym %lx saddr %lx\n", | 643 | pr_debug2("BB with bad start: addr %"PRIx64" start %"PRIx64" sym %"PRIx64" saddr %"PRIx64"\n", |
644 | ams->addr, | 644 | ams->addr, |
645 | start ? start->addr : 0, | 645 | start ? start->addr : 0, |
646 | ams->sym ? ams->sym->start + ams->map->start : 0, | 646 | ams->sym ? ams->sym->start + ams->map->start : 0, |