[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101223133525.GC1769@nowhere>
Date: Thu, 23 Dec 2010 14:35:28 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Nick Piggin <npiggin@...nel.dk>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: buggy perf callgraph output
On Thu, Dec 23, 2010 at 02:08:20PM +0100, Ingo Molnar wrote:
>
> * Frederic Weisbecker <fweisbec@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists