Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753575AbbFLIwd (ORCPT ); Fri, 12 Jun 2015 04:52:33 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34081 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458AbbFLIwV (ORCPT ); Fri, 12 Jun 2015 04:52:21 -0400 Date: Fri, 12 Jun 2015 01:51:53 -0700 From: tip-bot for He Kuang Message-ID: Cc: mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, hekuang@huawei.com, kan.liang@intel.com, hpa@zytor.com, acme@redhat.com, wangnan0@huawei.com, jolsa@kernel.org, a.p.zijlstra@chello.nl Reply-To: jolsa@kernel.org, a.p.zijlstra@chello.nl, wangnan0@huawei.com, hpa@zytor.com, acme@redhat.com, kan.liang@intel.com, hekuang@huawei.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <1434026664-71642-1-git-send-email-hekuang@huawei.com> References: <1434026664-71642-1-git-send-email-hekuang@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Fix build failure on 32-bit arch Git-Commit-ID: 6ba29c2fa5adcc33b201faec99057b6a72bd5029 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3082 Lines: 66 Commit-ID: 6ba29c2fa5adcc33b201faec99057b6a72bd5029 Gitweb: http://git.kernel.org/tip/6ba29c2fa5adcc33b201faec99057b6a72bd5029 Author: He Kuang AuthorDate: Thu, 11 Jun 2015 12:44:24 +0000 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 11 Jun 2015 11:14:21 -0300 perf tools: Fix build failure on 32-bit arch Failed in 32bit arch build like this: CC /opt/h00206996/output/perf/arm32/builtin-record.o util/session.c: In function ‘perf_session__warn_about_errors’: util/session.c:1304:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Werror=format=] builtin-report.c: In function ‘perf_evlist__tty_browse_hists’: builtin-report.c:323:2: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=] Replace %lu format strings in warning message with PRIu64 for u64 'total_lost_samples' to fix this problem. Signed-off-by: He Kuang Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1434026664-71642-1-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-report.c | 2 +- tools/perf/util/session.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 628090b..32626ea 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -320,7 +320,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist, { struct perf_evsel *pos; - fprintf(stdout, "#\n# Total Lost Samples: %lu\n#\n", evlist->stats.total_lost_samples); + fprintf(stdout, "#\n# Total Lost Samples: %" PRIu64 "\n#\n", evlist->stats.total_lost_samples); evlist__for_each(evlist, pos) { struct hists *hists = evsel__hists(pos); const char *evname = perf_evsel__name(pos); diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 88d87bf..f31e024 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1299,7 +1299,7 @@ static void perf_session__warn_about_errors(const struct perf_session *session) drop_rate = (double)stats->total_lost_samples / (double) (stats->nr_events[PERF_RECORD_SAMPLE] + stats->total_lost_samples); if (drop_rate > 0.05) { - ui__warning("Processed %lu samples and lost %3.2f%% samples!\n\n", + ui__warning("Processed %" PRIu64 " samples and lost %3.2f%% samples!\n\n", stats->nr_events[PERF_RECORD_SAMPLE] + stats->total_lost_samples, drop_rate * 100.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/