Re: [RFC PATCH] perf report: add sort by file lines

From: Arnaldo Carvalho de Melo
Date: Tue Mar 29 2011 - 13:46:19 EST


Em Tue, Mar 29, 2011 at 07:08:53PM +0200, Peter Zijlstra escreveu:
> On Tue, 2011-03-29 at 19:06 +0200, Peter Zijlstra wrote:
> > On Tue, 2011-03-29 at 19:03 +0200, Peter Zijlstra wrote:
> > > > Is it an unwind of the call frame stack to find out what data member was
> > > > accessed?

> > > No need to unwind stacks, DWARF should have information on function
> > > local stack. It should be able to tell you the type of things like -8(%
> > > rbp).

> > That is, we don't even have a life stack to unwind, so we simply cannot
> > unwind at all, but the debug information should be able to tell you the
> > type of whatever would live at a certain stack position if we were to
> > have a stack.

> Furthermore, I've now completely exhausted my knowledge of debuginfo and
> hope Masami and Arnaldo will help with further details ;-)

:-)

I think the place to look is 'perf probe', look for the way one
variable is translated to an expression passed to the kprobe_tracer, I
think you'll need the reverse operation.

Look at tools/perf/util/probe-finder.c, function find_variable() and
convert_variable_location().

Understanding how those functions use the dwarf_ prefixed routines from
libdw should be a good start.

- 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/