2013-10-15 02:09:45

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: perf top using /proc/kcore

Hi Adrian,

While testing 'perf top -U' to reply a message in another thread
I noticed that ksm symbols appeared as '[kernel]', and only when I tried
'perf top -U -v' to look at the DSO long name I noticed that it was...
/proc/kcore.

Question is: since we have access to /proc/modules, can't we
parse that, as when we have access to vmlinux, and recreate the mmaps,
etc, and see:

[module] symbol

Instead of grouping everything into a single [kernel] bucket?

- Arnaldo


2013-10-15 06:14:32

by Adrian Hunter

[permalink] [raw]
Subject: Re: perf top using /proc/kcore

On 15/10/13 05:09, Arnaldo Carvalho de Melo wrote:
> Hi Adrian,
>
> While testing 'perf top -U' to reply a message in another thread
> I noticed that ksm symbols appeared as '[kernel]', and only when I tried
> 'perf top -U -v' to look at the DSO long name I noticed that it was...
> /proc/kcore.
>
> Question is: since we have access to /proc/modules, can't we
> parse that, as when we have access to vmlinux, and recreate the mmaps,
> etc, and see:
>
> [module] symbol
>
> Instead of grouping everything into a single [kernel] bucket?

I would suggest just splitting the maps and giving them names, rather than
splitting the dso as well. That would mean changing places that have:

map->dso->short_name

to

map->name ? map->name : map->dso->short_name