From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbbHQTMv (ORCPT ); Mon, 17 Aug 2015 15:12:51 -0400 Received: from casper.infradead.org ([85.118.1.10]:39556 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbbHQTMt (ORCPT ); Mon, 17 Aug 2015 15:12:49 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Adrian Hunter , Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 05/14] perf annotate: Fix 32-bit compilation error in util/annotate.c Date: Mon, 17 Aug 2015 16:11:58 -0300 Message-Id: <1439838727-6824-6-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1439838727-6824-1-git-send-email-acme@kernel.org> References: <1439838727-6824-1-git-send-email-acme@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter 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 Cc: Andi Kleen Cc: Jiri Olsa 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 --- 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