Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208810
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 05/14] perf annotate: Fix 32-bit compilation error in util/annotate.c |
| Date | 2015-08-17 21:20 +0200 |
| Message-ID | <pYy6T-83E-53@gated-at.bofh.it> (permalink) |
| References | <pYy6S-83E-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Adrian Hunter <adrian.hunter@intel.com>
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>
---
tools/perf/util/annotate.c | 4 ++--
1 file 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,
struct addr_map_symbol *start,
unsigned cycles)
{
- unsigned long saddr = 0;
+ u64 saddr = 0;
int err;
if (!cycles)
@@ -640,7 +640,7 @@ int addr_map_symbol__account_cycles(struct addr_map_symbol *ams,
start->addr == ams->sym->start + ams->map->start)))
saddr = start->al_addr;
if (saddr == 0)
- pr_debug2("BB with bad start: addr %lx start %lx sym %lx saddr %lx\n",
+ pr_debug2("BB with bad start: addr %"PRIx64" start %"PRIx64" sym %"PRIx64" saddr %"PRIx64"\n",
ams->addr,
start ? start->addr : 0,
ams->sym ? ams->sym->start + ams->map->start : 0,
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 04/14] perf script: Initialize callchain_param.record_mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 02/14] perf probe: Fix to add missed brace around if block Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 05/14] perf annotate: Fix 32-bit compilation error in util/annotate.c Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 07/14] perf tools: Add a helper function to probe whether cpu-wide tracing is possible Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 08/14] perf auxtrace: Add Intel PT as an AUX area tracing type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 11/14] perf tools: Add Intel PT log Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 03/14] perf trace: Move vfs_getname storage to per thread area Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 01/14] perf tools: Support static linking with libdw Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 09/14] perf tools: Add Intel PT packet decoder Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200 [PATCH 06/14] perf symbols: Fix annotation of vdso Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-17 21:20 +0200
csiph-web