diff options
author | Tom Huynh <tom.huynh@freescale.com> | 2015-01-22 22:45:42 (GMT) |
---|---|---|
committer | Honghua Yin <Hong-Hua.Yin@freescale.com> | 2015-04-21 02:35:30 (GMT) |
commit | e5813370f1978ccd25b09c8d86c4d5780d0cc6df (patch) | |
tree | 5fc14a37c6b793be32d1d943d5b6e841ec77422b /tools | |
parent | 856a3c2212c07740a84774dd01b8d68b751b4f67 (diff) | |
download | linux-fsl-qoriq-e5813370f1978ccd25b09c8d86c4d5780d0cc6df.tar.xz |
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 <tom.huynh@freescale.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Matt Mullins <mmullins@mmlx.us>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1417541842-9747-1-git-send-email-tom.huynh@freescale.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Change-Id: I74e6ad212a7e0dd26b52f738f54f1b6d60edd60d
Reviewed-on: http://git.am.freescale.net:8181/29120
Reviewed-by: Yang Li <LeoLi@freescale.com>
Tested-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |