From e5813370f1978ccd25b09c8d86c4d5780d0cc6df Mon Sep 17 00:00:00 2001 From: Tom Huynh Date: Thu, 22 Jan 2015 16:45:42 -0600 Subject: perf hists browser: Change print format from %lu to %PRIu64 The nr_events variable in tools/perf/ui/browsers/hists.c is of type u64, so the print format (%lu) causes 'perf report' to show 0 event count when running with 32-bit userspace without redirection. This patch fixes that problem by printing nr_events as PRIu64. Signed-off-by: Tom Huynh Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kim Phillips Cc: Matt Mullins Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1417541842-9747-1-git-send-email-tom.huynh@freescale.com Signed-off-by: Arnaldo Carvalho de Melo Change-Id: I74e6ad212a7e0dd26b52f738f54f1b6d60edd60d Reviewed-on: http://git.am.freescale.net:8181/29120 Reviewed-by: Yang Li Tested-by: Honghua Yin Reviewed-by: Honghua Yin diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 7ef36c3..772aeb7 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -1245,7 +1245,7 @@ static int hists__browser_title(struct hists *hists, char *bf, size_t size, nr_samples = convert_unit(nr_samples, &unit); printed = scnprintf(bf, size, - "Samples: %lu%c of event '%s', Event count (approx.): %lu", + "Samples: %lu%c of event '%s', Event count (approx.): %"PRIu64, nr_samples, unit, ev_name, nr_events); -- cgit v0.10.2