On Thu, Mar 03, 2011 at 10:30:15AM -0700, David Ahern wrote:
> On 03/03/11 10:19, Frederic Weisbecker wrote:
> > to use perf_session__resolve_callchain() that resolves the raw struct 
> > ip_callchain
> > (only made of raw ips) into a cursor (list of ips resolved into symbols and 
> > so) and
> > walk through the cursor with the two accessors.
> > 
> > Ah I forgot, you first need to use callchain_cursor_commit() in order to 
> > initialize
> > the position in the cursor.
> > 
> > So:
> > 
> > 1) Resolve with perf_session__resolve_callchain()
> > 2) commit with callchain_cursor_commit()
> > 3) iterate with callchain_cursor_current(), callchain_cursor_advance()
> 
> yes, I figured out the missing commit, and I changed the loop to:
> while (1) {
>     node = callchain_cursor_current(cursor);
>     if (!node)
>         break;
> 
>       ... (print chain)
> 
>     callchain_cursor_advance(cursor);
> }

Yep.

> 
> Thanks for the comments.
> 
> What about the python and perl engines? Right now they are tracepoint
> specific. I do not have a sufficient background in either to expand to
> other sample types.

Not a problem, the new parameters layout paves the way to make it later feasible
if someone is interested.

--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to