lkml.org 
[lkml]   [2009]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] perf tools: Add support for breakpoint events in perf tools
Em Mon, Nov 23, 2009 at 09:25:28PM +0100, Frederic Weisbecker escreveu:
> On Mon, Nov 23, 2009 at 11:06:01PM +0530, K.Prasad wrote:
> > With kernel symbols as input it would be possible to derive the bkpt
> > length based on the symbol-size, say using kallsyms_lookup_size_offset()
> > (although the corresponding length may not be available on the host
> > processor such requests can be failed or over-ridden by the user using
> > a smaller length), but for addresses I think it is vital to know what
> > breakpoint length is desired by the user.

> Yeah. I guess we first need a way to manually add this length, may be:

> mem:addr/len:access

> And as you said, finding it automatically for symbols. But still,
> passing symbols to perf attr leads to confusion and complexity if we
> want to profile in userspace.

> I think we should find this symbol length from userspace. I'm not sure
> how yet, probably using Dwarf. Arnaldo, do you have an idea about that?

DWARF has the type for each variable or struct member, getting its size
is straightforward.

Using just /proc/kallsyms all we can do is find the size of a variable
by looking at its address and the address of the next one.

- Arnaldo


\
 
 \ /
  Last update: 2009-11-23 22:13    [W:0.056 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site