On Thu, Nov 12, 2020 at 7:05 AM Jiri Olsa <jolsa@xxxxxxxxxx> wrote: > > Currently we skip functions under .init* sections, Removing the .init* > section check, BTF now contains also functions from .init* sections. > > Andrii's explanation from email: > > > ... I think we should just drop the __init check and > > include all the __init functions into BTF. There could be cases where > > we'd need to attach BPF programs to __init functions (e.g., bpf_lsm > > security cases), so having BTFs for those FUNCs are necessary as well. > > Ftrace currently disallows that, but it's only because no user-space > > application has a way to attach probes early enough. This might change > > in the future, so there is no need to invent special mechanisms now > > for bpf_iter function preservation. Let's just include all __init > > functions in BTF. > > It's over ~2000 functions on my .config: > > $ bpftool btf dump file ./vmlinux | grep 'FUNC ' | wc -l > 41505 > $ bpftool btf dump file /sys/kernel/btf/vmlinux | grep 'FUNC ' | wc -l > 39256 > > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx> > --- Looks good. Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > btf_encoder.c | 43 ++----------------------------------------- > 1 file changed, 2 insertions(+), 41 deletions(-) > [...]