Re: [PATCH 00/14] bpf: Add trampoline and dispatcher to /proc/kallsyms
From: Arnaldo Carvalho de Melo <hidden>
Date: 2020-02-12 13:31:34
Also in:
bpf
Em Wed, Feb 12, 2020 at 12:13:46PM +0100, Jiri Olsa escreveu:
On Tue, Feb 11, 2020 at 04:32:23PM -0300, Arnaldo Carvalho de Melo wrote:quoted
Historically vmlinux was preferred because it contains function sizes, but with all these out of the blue symbols, we need to prefer starting with /proc/kallsyms and, as we do now, continue getting updates via PERF_RECORD_KSYMBOL.
quoted
Humm, but then trampolines don't generate that, right? Or does it? If it doesn't, then we will know about just the trampolines in place when the record/top session starts, reparsing /proc/kallsyms periodically seems excessive?
I plan to extend the KSYMBOL interface to contain trampolines/dispatcher data,
That seems like the sensible, without looking too much at all the details, to do, yes.
plus we could do some inteligent fallback to /proc/kallsyms in case vmlinux won't have anything
At this point what would be the good reason to prefer vmlinux instead of going straight to using /proc/kallsyms? We have support for taking a snapshot of it at 'perf top' start, i.e. right at the point we need to resolve a kernel symbol, then we get PERF_RECORD_KSYMBOL for things that gets in place after that. And as well we save it to the build-id cache so that later, at 'perf report/script' time we can resolve kernel symbols, etc. vmlinux is just what is in there right before boot, after that, for quite some time, _lots_ of stuff happens :-) - Arnaldo