Messages in this thread | | | Date | Wed, 24 Nov 2010 13:10:46 -0200 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH 2/2] perf:tools: figure out start address of kernel map from /proc/kallsyms |
| |
Em Wed, Nov 24, 2010 at 10:38:29PM +0800, Ming Lei escreveu: > 2010/11/24 Arnaldo Carvalho de Melo <acme@ghostprotocols.net>: > > 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
| |