Re: [PATCH] perf report: auto-detect branch stack sampling mode

From: Arnaldo Carvalho de Melo
Date: Mon Mar 05 2012 - 22:07:07 EST


Em Mon, Mar 05, 2012 at 03:35:35PM -0800, Arun Sharma escreveu:
> Like you probably figured from my other mail, we deal with deeply
> nested callchains with unwieldy function names a lot -- thanks to C++
> and template programming. --tui's collapsing/expanding functionality
> is quite useful to navigate that mess. I'm just taking this
> opportunity to get some attention focused on improving it :)

Excellent!

I can think about other Zoom operations, like zooming into just the
entries where some specific function in its callchains, say the one
under the cursor, appears, etc.

> On 3/5/12 2:26 PM, Arnaldo Carvalho de Melo wrote:
>
> >>Here's an example:
> >>
> >># perf record -ag -- sleep 3
> >># perf report -G -s pid --tui # SIGSEGV
> >
> >Ok, now this is a good report, I managed to reproduce and will work on a
> >fix, thanks,
>
> 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 :-\

> The other problem area seems to be callchains when using -p regexp
> -x options. I'll try to summarize problems there in a separate
> thread.

Please do,

Thanks a lot!

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/