summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-03-10 17:44:09 -0700
committerAlexei Starovoitov <ast@kernel.org>2019-03-14 13:53:18 -0700
commit9768095ba97ce946838e8210f0b44f2fd36ec31d (patch)
tree991332fbd5ee7eacdf4beb46cda6c32110d8834e /tools/testing
parentf48a920504e516bded420255946f8e1cb8a0944a (diff)
downloadlinux-9768095ba97ce946838e8210f0b44f2fd36ec31d.tar.bz2
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>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions