Home
last modified time | relevance | path

Searched hist:"9768095 ba97ce946838e8210f0b44f2fd36ec31d" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/lib/bpf/
H A Dbtf.cdiff 9768095ba97ce946838e8210f0b44f2fd36ec31d Sun Mar 10 19:44:09 CDT 2019 Andrii Nakryiko <andriin@fb.com> btf: resolve enum fwds in btf_dedup

GCC and clang support enum forward declarations as an extension. Such
forward-declared enums will be represented as normal BTF_KIND_ENUM types with
vlen=0. This patch adds ability to resolve such enums to their corresponding
fully defined enums. This helps to avoid duplicated BTF type graphs which only
differ by some types referencing forward-declared enum vs full enum.

One such example in kernel is enum irqchip_irq_state, defined in
include/linux/interrupt.h and forward-declared in include/linux/irq.h. This
causes entire struct task_struct and all referenced types to be duplicated in
btf_dedup output. This patch eliminates such duplication cases.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>