[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120306062727.GA5100@elte.hu>
Date: Tue, 6 Mar 2012 07:27:27 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Arun Sharma <asharma@...com>,
Peter Zijlstra <peterz@...radead.org>,
Stephane Eranian <eranian@...gle.com>,
linux-kernel@...r.kernel.org, dsahern@...il.com, ravitillo@....gov,
khandual@...ux.vnet.ibm.com, robert.richter@....com,
ming.m.lin@...el.com, vweaver1@...s.utk.edu, andi@...stfloor.org
Subject: Re: [PATCH] perf report: auto-detect branch stack sampling mode
* Arnaldo Carvalho de Melo <acme@...hat.com> wrote:
> > Something like this seems to do it for me.
> >
> > offset = addr - sym->start;
> > + len = sym->end - sym->start;
> > + if (offset >= len)
> > + return 0;
> > +
>
> That is my fault, I should have added a BUG_ON() spitting out
> a callchain in this case, as that function shouldn't be called
> if the address is not within its range :-\
Btw., I'd suggest not doing a BUG_ON() but some less destructive
warning: both symbol table errors and sample stream hickups are
common and can lead to essentially arbitrary input data - we
shouldn't crash on that.
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