From: Ingo Molnar <mingo@elte.hu>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Nick Piggin <npiggin@kernel.dk>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: buggy perf callgraph output
Date: Thu, 23 Dec 2010 14:08:20 +0100 [thread overview]
Message-ID: <20101223130820.GA7680@elte.hu> (raw)
In-Reply-To: <20101223125535.GA1769@nowhere>
* Frederic Weisbecker <fweisbec@gmail.com> wrote:
> On Fri, Dec 17, 2010 at 04:32:58PM +1100, Nick Piggin wrote:
> > That would be great, thanks! It's a really awesome tool, I appreciate
> > your effort on it.
>
> Thanks :)
>
> So the below patch should fix the issue. Tell me if you encounter it
> again, or anything else.
>
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index d503670..c749ba6 100644
> --- a/tools/perf/util/hist.c
> +++ b/tools/perf/util/hist.c
> @@ -356,7 +356,7 @@ static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask,
>
> static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain,
> int depth, int depth_mask, int period,
> - u64 total_samples, int hits,
> + u64 total_samples, u64 hits,
> int left_margin)
Hmm ... nice fix but why didnt GCC warn about the loss of half of the 'cumul' bits
in this call:
ret += ipchain__fprintf_graph(fp, chain, depth,
new_depth_mask, i++,
new_total,
cumul,
left_margin);
We really, really want GCC to warn about this - it's such a common mistake. What
disabled that warning? Very weird.
Thanks,
Ingo
next prev parent reply other threads:[~2010-12-23 13:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 16:40 Nick Piggin
2010-12-08 21:48 ` Frederic Weisbecker
2010-12-15 13:02 ` Nick Piggin
2010-12-16 11:47 ` Frederic Weisbecker
2010-12-17 5:32 ` Nick Piggin
2010-12-23 12:55 ` Frederic Weisbecker
2010-12-23 13:08 ` Ingo Molnar [this message]
2010-12-23 13:35 ` Frederic Weisbecker
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=20101223130820.GA7680@elte.hu \
--to=mingo@elte.hu \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@kernel.dk \
/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
Powered by JetHome