From 6ba29c2fa5adcc33b201faec99057b6a72bd5029 Mon Sep 17 00:00:00 2001 From: He Kuang Date: Thu, 11 Jun 2015 12:44:24 +0000 Subject: perf tools: Fix build failure on 32-bit arch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/builtin-report.c') diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 628090b478ab..32626ea3e227 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); -- cgit v1.2.3