From: Tom Huynh <tom.huynh@freescale.com>
To: <mingo@redhat.com>, <acme@kernel.org>, <namhyung@kernel.org>,
<jolsa@kernel.org>
Cc: <a.p.zijlstra@chello.nl>, <paulus@samba.org>,
<kim.phillips@freescale.com>, <linux-kernel@vger.kernel.org>,
Tom Huynh <tom.huynh@freescale.com>
Subject: [PATCH] perf hist browser: change print format from lu to llu to fit u64 type
Date: Tue, 18 Nov 2014 17:00:27 -0600 [thread overview]
Message-ID: <1416351627-360-1-git-send-email-tom.huynh@freescale.com> (raw)
nr_events in tools/perf/ui/browsers/hists.c is of type u64, thus it should
be printed as %llu instead of %lu. 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.
Signed-off-by: Tom Huynh <tom.huynh@freescale.com>
---
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..49b2471 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.): %llu",
nr_samples, unit, ev_name, nr_events);
--
1.9.1
next reply other threads:[~2014-11-18 23:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 23:00 Tom Huynh [this message]
2014-11-25 23:51 ` Matt Mullins
2014-11-26 7:57 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416351627-360-1-git-send-email-tom.huynh@freescale.com \
--to=tom.huynh@freescale.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=kim.phillips@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®