lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 Mar 2011 18:19:44 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	David Ahern <daahern@...co.com>
Cc:	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	acme@...stprotocols.net, mingo@...e.hu, peterz@...radead.org,
	paulus@...ba.org, tglx@...utronix.de
Subject: Re: [PATCH 3/3] perf script: dump software events and samples from
 hardware-based profiling

On Thu, Mar 03, 2011 at 07:20:10AM -0700, David Ahern wrote:
> On 03/02/2011 08:05 PM, Frederic Weisbecker wrote:
> > Hmm, that's a wrong way of walking through callchains. In fact it's not
> > a classical list. node->next can be a ghost entry from a previous callchain
> > that we kept cached in order to optimize allocations.
> > 
> > You need the accessors callchain_cursor_current() and callchain_cursor_advance().
> 
> Ok. I'll look at perf-report's callchain_append again.

Yeah callchain_append() is too much a generic name for something actually
rather specific. In fact callchain_append() adds a callchain, already
resolved, to a histogram in order to produce that statistical tree in the end
that you can have with perf report.

But you don't need those statistical tree of callchains, it's only used
by perf report for now. Instead you rather need to treat every callchains
individually and print each of them.

So you don't even need callchain_append(). All you need in the end is
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()

Thanks.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ