All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] perf hists: change print format from lu to PRIu64
@ 2014-12-02 17:37 Tom Huynh
  2014-12-12  8:16 ` [tip:perf/urgent] perf hists browser: Change print format from %lu to %PRIu64 tip-bot for Tom Huynh
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Huynh @ 2014-12-02 17:37 UTC (permalink / raw)
  To: mingo, acme, namhyung, jolsa
  Cc: a.p.zijlstra, paulus, kim.phillips, linux-kernel, mmullins,
	Tom Huynh

nr_events 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>
---
change since v1: replace %llu with PRIu64

 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index cfb976b..c6d68b8 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1254,7 +1254,7 @@ static int hists__browser_title(struct hists *hists,
 
 	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);
 
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-12  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 17:37 [PATCHv2] perf hists: change print format from lu to PRIu64 Tom Huynh
2014-12-12  8:16 ` [tip:perf/urgent] perf hists browser: Change print format from %lu to %PRIu64 tip-bot for Tom Huynh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.