All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: David Ahern <daahern@cisco.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	acme@ghostprotocols.net, mingo@elte.hu, peterz@infradead.org,
	paulus@samba.org, tglx@linutronix.de
Subject: Re: [PATCH 3/3] perf script: dump software events and samples from hardware-based profiling
Date: Thu, 3 Mar 2011 19:06:27 +0100	[thread overview]
Message-ID: <20110303180624.GD1807@nowhere> (raw)
In-Reply-To: <4D6FD027.3080704@cisco.com>

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.

      reply	other threads:[~2011-03-03 18:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 17:29 [PATCH 0/3] perf script: add support for S/W events and H/W based profiling David Ahern
2011-03-02 17:29 ` [PATCH 1/3] perf script: change process_event prototype David Ahern
2011-03-03  2:40   ` Frederic Weisbecker
2011-03-03 14:11     ` David Ahern
2011-03-03 17:07       ` Frederic Weisbecker
2011-03-02 17:29 ` [PATCH 2/3] perf script: prepare to handle more than tracepoint events David Ahern
2011-03-02 17:29 ` [PATCH 3/3] perf script: dump software events and samples from hardware-based profiling David Ahern
2011-03-03  3:05   ` Frederic Weisbecker
2011-03-03 14:20     ` David Ahern
2011-03-03 17:19       ` Frederic Weisbecker
2011-03-03 17:30         ` David Ahern
2011-03-03 18:06           ` Frederic Weisbecker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110303180624.GD1807@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@ghostprotocols.net \
    --cc=daahern@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.