From: Yonghong Song <yhs@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Alexei Starovoitov <ast@fb.com>, Martin Lau <kafai@fb.com>,
"acme@kernel.org" <acme@kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
Kernel Team <Kernel-team@fb.com>,
Edward Cree <ecree@solarflare.com>
Subject: Re: [PATCH btf 0/3] Add BTF types deduplication algorithm
Date: Thu, 31 Jan 2019 07:18:52 +0000 [thread overview]
Message-ID: <007ee25b-9ad4-aab9-657f-0200bf6a3a98@fb.com> (raw)
In-Reply-To: <20190131065837.3380288-1-andriin@fb.com>
add Edward.
On 1/30/19 10:58 PM, Andrii Nakryiko wrote:
> This patch series adds BTF deduplication algorithm to libbpf. This algorithm
> allows to take BTF type information containing duplicate per-compilation unit
> information and reduce it to equivalent set of BTF types with no duplication without
> loss of information. It also deduplicates strings and removes those strings that
> are not referenced from any BTF type (and line information in .BTF.ext section,
> if any).
>
> Algorithm also resolves struct/union forward declarations into concrete BTF types
> across multiple compilation units to facilitate better deduplication ratio. If
> undesired, this resolution can be disabled through specifying corresponding options.
>
> When applied to BTF data emitted by pahole's DWARF->BTF converter, it reduces
> the overall size of .BTF section by about 65x, from about 112MB to 1.75MB, leaving
> only 29247 out of initial 3073497 BTF type descriptors.
>
> Algorithm with minor differences and preliminary results before FUNC/FUNC_PROTO
> support is also described more verbosely at:
> https://facebookmicrosites.github.io/bpf/blog/2018/11/14/btf-enhancement.html
>
> Andrii Nakryiko (3):
> btf: extract BTF type size calculation
> btf: add BTF types deduplication algorithm
> selftests/btf: add initial BTF dedup tests
>
> tools/lib/bpf/btf.c | 1851 +++++++++++++++++++++++-
> tools/lib/bpf/btf.h | 11 +
> tools/lib/bpf/libbpf.map | 3 +
> tools/testing/selftests/bpf/test_btf.c | 535 ++++++-
> 4 files changed, 2333 insertions(+), 67 deletions(-)
>
next prev parent reply other threads:[~2019-01-31 7:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 6:58 [PATCH btf 0/3] Add BTF types deduplication algorithm Andrii Nakryiko
2019-01-31 6:58 ` [PATCH btf 1/3] btf: extract BTF type size calculation Andrii Nakryiko
2019-01-31 6:58 ` [PATCH btf 2/3] btf: add BTF types deduplication algorithm Andrii Nakryiko
2019-01-31 6:58 ` [PATCH btf 3/3] selftests/btf: add initial BTF dedup tests Andrii Nakryiko
2019-01-31 7:18 ` Yonghong Song [this message]
2019-02-05 0:26 ` [PATCH btf 0/3] Add BTF types deduplication algorithm Daniel Borkmann
2019-02-05 1:34 ` Andrii Nakryiko
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=007ee25b-9ad4-aab9-657f-0200bf6a3a98@fb.com \
--to=yhs@fb.com \
--cc=Kernel-team@fb.com \
--cc=acme@kernel.org \
--cc=andriin@fb.com \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=ecree@solarflare.com \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
/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