* [PATCH] perf tools: Fix 32-bit compilation error in util/annotate.c
@ 2015-08-14 7:11 Adrian Hunter
2015-08-20 9:56 ` [tip:perf/core] perf annotate: " tip-bot for Adrian Hunter
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Hunter @ 2015-08-14 7:11 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Jiri Olsa, Andi Kleen
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>
---
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,
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:perf/core] perf annotate: Fix 32-bit compilation error in util/annotate.c
2015-08-14 7:11 [PATCH] perf tools: Fix 32-bit compilation error in util/annotate.c Adrian Hunter
@ 2015-08-20 9:56 ` tip-bot for Adrian Hunter
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Adrian Hunter @ 2015-08-20 9:56 UTC (permalink / raw)
To: linux-tip-commits
Cc: hpa, linux-kernel, mingo, tglx, ak, jolsa, acme, adrian.hunter
Commit-ID: 3d7245b0946c13a97e3a10213b8fd0152972a0d5
Gitweb: http://git.kernel.org/tip/3d7245b0946c13a97e3a10213b8fd0152972a0d5
Author: Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Fri, 14 Aug 2015 10:11:34 +0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 17 Aug 2015 11:06:21 -0300
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>
---
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 e0b6146..8a18347 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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-20 9:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 7:11 [PATCH] perf tools: Fix 32-bit compilation error in util/annotate.c Adrian Hunter
2015-08-20 9:56 ` [tip:perf/core] perf annotate: " tip-bot for Adrian Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome