Re: [PATCH 2/2] perf:tools: figure out start address of kernel mapfrom /proc/kallsyms

From: Arnaldo Carvalho de Melo
Date: Wed Nov 24 2010 - 10:11:00 EST


Em Wed, Nov 24, 2010 at 10:38:29PM +0800, Ming Lei escreveu:
> 2010/11/24 Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxx>:
> > Can you please use kallsyms__parse()? Please take a look at
> > event__synthesize_kernel_mmap as it also uses it.
>
> Good idea, but kallsyms__parse does not pass a parameter
> which indicates if it is a module or kernel symbol to process handler.
>
> So could you agree on adding one parameter which indicates if
> the current symbol is module symbol to process handler?
>
> If so, I can use kallsyms__parse.

It passes, for a line like:

ffffffffa00361ce t serio_raw_connect [serio_raw]

The process callback will receive:

process_symbol(arg=callback arg,
symbol_name="serio_raw_connect [serio_raw]",
symbol_type='T', start=0xffffffffa00361ce)

That is how we figure out if it is a module when splitting the kallsyms
into modules, as kallsyms__parse is also used in:

dso__load_kallsyms
dso__load_all_kallsyms
kallsyms__parse

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