public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Tom Huynh <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jolsa@kernel.org, mingo@kernel.org, acme@redhat.com,
	tom.huynh@freescale.com, linux-kernel@vger.kernel.org,
	namhyung@kernel.org, mingo@redhat.com, a.p.zijlstra@chello.nl,
	kim.phillips@freescale.com, paulus@samba.org, hpa@zytor.com,
	tglx@linutronix.de, mmullins@mmlx.us
Subject: [tip:perf/urgent] perf hists browser: Change print format from %lu to %PRIu64
Date: Fri, 12 Dec 2014 00:16:36 -0800	[thread overview]
Message-ID: <tip-e641f696ebe4514efac00d1f4a485a06c8e94eea@git.kernel.org> (raw)
In-Reply-To: <1417541842-9747-1-git-send-email-tom.huynh@freescale.com>

Commit-ID:  e641f696ebe4514efac00d1f4a485a06c8e94eea
Gitweb:     http://git.kernel.org/tip/e641f696ebe4514efac00d1f4a485a06c8e94eea
Author:     Tom Huynh <tom.huynh@freescale.com>
AuthorDate: Tue, 2 Dec 2014 11:37:22 -0600
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 9 Dec 2014 09:14:32 -0300

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>
---
 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 502daff..e6bb04b 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1252,7 +1252,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);
 
 

      reply	other threads:[~2014-12-12  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 17:37 [PATCHv2] perf hists: change print format from lu to PRIu64 Tom Huynh
2014-12-12  8:16 ` tip-bot for Tom Huynh [this message]

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=tip-e641f696ebe4514efac00d1f4a485a06c8e94eea@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=kim.phillips@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmullins@mmlx.us \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=tom.huynh@freescale.com \
    /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