bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	dwarves@vger.kernel.org, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andriin@fb.com>, Yonghong Song <yhs@fb.com>,
	Hao Luo <haoluo@google.com>
Subject: Re: [RFC/PATCH 1/3] btf_encoder: Generate also .init functions
Date: Thu, 12 Nov 2020 11:37:45 -0800	[thread overview]
Message-ID: <CAEf4BzbdysbGSvJRBZDN=R82KOSgQ8qm_6TDGMhEP3Pvg1RQSw@mail.gmail.com> (raw)
In-Reply-To: <20201112150506.705430-2-jolsa@kernel.org>

On Thu, Nov 12, 2020 at 7:05 AM Jiri Olsa <jolsa@kernel.org> 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@kernel.org>
> ---

Looks good.

Acked-by: Andrii Nakryiko <andrii@kernel.org>

>  btf_encoder.c | 43 ++-----------------------------------------
>  1 file changed, 2 insertions(+), 41 deletions(-)
>

[...]

  reply	other threads:[~2020-11-12 19:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 15:05 [RFC 0/3] btf_encoder: Fix functions BTF data generation Jiri Olsa
2020-11-12 15:05 ` [RFC/PATCH 1/3] btf_encoder: Generate also .init functions Jiri Olsa
2020-11-12 19:37   ` Andrii Nakryiko [this message]
2020-11-12 15:05 ` [RFC/PATCH 2/3] btf_encoder: Put function generation code to generate_func Jiri Olsa
2020-11-12 19:39   ` Andrii Nakryiko
2020-11-12 15:05 ` [RFC/PATCH 3/3] btf_encoder: Func generation fix Jiri Olsa
2020-11-12 19:54   ` Andrii Nakryiko
2020-11-12 21:14     ` Jiri Olsa
2020-11-13  0:08       ` Andrii Nakryiko
2020-11-13  0:18         ` Alexei Starovoitov
2020-11-13  0:30           ` Andrii Nakryiko
2020-11-13  1:00             ` Yonghong Song
2020-11-13  1:12               ` Andrii Nakryiko
2020-11-13 10:59         ` Jiri Olsa
2020-11-13 11:52           ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEf4BzbdysbGSvJRBZDN=R82KOSgQ8qm_6TDGMhEP3Pvg1RQSw@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=acme@kernel.org \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=haoluo@google.com \
    --cc=jolsa@kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).