From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
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:35:28 +0100 [thread overview]
Message-ID: <20101223133525.GC1769@nowhere> (raw)
In-Reply-To: <20101223130820.GA7680@elte.hu>
On Thu, Dec 23, 2010 at 02:08:20PM +0100, Ingo Molnar wrote:
>
> * 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.
No idea. I thought perf had that in its warning arsenal :)
>
> Thanks,
>
> Ingo
prev parent reply other threads:[~2010-12-23 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 16:40 buggy perf callgraph output 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
2010-12-23 13:35 ` Frederic Weisbecker [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=20101223133525.GC1769@nowhere \
--to=fweisbec@gmail.com \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 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.