3 - Support split BTF, where a main BTF file, vmlinux, can be used to find types
4 and then a kernel module, for instance, can have just what is unique to it.
6 For instance, looking for a type in the main vmlinux BTF info:
8 $ pahole wmi_notify_handler
9 pahole: type 'wmi_notify_handler' not found
12 If we look at the 'wmi' module BTF info that is in:
14 $ ls -la /sys/kernel/btf/wmi
15 -r--r--r--. 1 root root 2866 Nov 18 13:35 /sys/kernel/btf/wmi
18 $ pahole /sys/kernel/btf/wmi -C wmi_notify_handler
19 typedef void (*wmi_notify_handler)(u32, void *);
22 '--btf_base=/sys/kernel/btf/vmlinux' was automatically added in this last
23 example, an option that was also introduced in this version where types used in
24 the wmi.ko module but present in vmlinux can be found so that there is no
27 - Update libbpf to get the split BTF support and use some of its functions to
28 load BTF and speed up DWARF loading and BTF encoding.
30 - Support cross-compiled ELF binaries with different endianness
32 - Support showing typedefs for anonymous types, like structs, unions and enums,
33 see the "Align enumerators" entry below for an example, another:
37 arch_rwlock_t raw_lock; /* 0 8 */
39 /* size: 8, cachelines: 1, members: 1 */
40 /* last cacheline: 8 bytes */
46 $ pahole ZSTD_strategy
59 - Workaround bugs in the generation of DWARF records for functions in some gcc
60 versions that were causing breakage in the encoding of BTF:
62 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97060 "Missing DW_AT_declaration=1 in dwarf data"
64 - Ignore zero-sized ELF symbols instead of erroring out.
66 - Handle union forward declaration properly in the BTF loader.
68 - Introduce --numeric_version for use in scripts and Makefiles:
72 $ pahole --numeric_version
76 To avoid things like this in the kernel's scripts/link-vmlinux.sh:
78 pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
80 - Try sole pfunct argument as a function name, just like pahole with type names:
83 int tcp_v4_rcv(struct sk_buff * skb);
86 - Speed up pfunct using some of the load techniques used in pahole.
88 - Discard CUs after BTF encoding as they're not used anymore, greatly reducing
89 memory usage and speeding up vmlinux BTF encoding.
91 - Revamp how per-CPU variables are encoded in BTF.
93 - Include BTF info for static functions.
95 - Use BTF's string APIs for strings management, greatly improving performance
98 - Increase size of DWARF lookup hash table, shaving off about 1 second out of
99 about 20 seconds total for Linux BTF dedup.
101 - Stop BTF encoding when errors are found in some DWARF CU.
103 - Implement --packed, to show just packed structures, for instance, here are
104 the top 5 packed data structures in the Linux kernel:
106 $ pahole --sizes --packed | sort -k2 -nr | head -5
110 snd_soc_tplg_pcm 912 0
114 And here is one of them:
116 $ pahole efi_variable
117 struct efi_variable {
118 efi_char16_t VariableName[512]; /* 0 1024 */
119 /* --- cacheline 16 boundary (1024 bytes) --- */
120 efi_guid_t VendorGuid; /* 1024 16 */
121 long unsigned int DataSize; /* 1040 8 */
122 __u8 Data[1024]; /* 1048 1024 */
123 /* --- cacheline 32 boundary (2048 bytes) was 24 bytes ago --- */
124 efi_status_t Status; /* 2072 8 */
125 __u32 Attributes; /* 2080 4 */
127 /* size: 2084, cachelines: 33, members: 6 */
128 /* last cacheline: 36 bytes */
129 } __attribute__((__packed__));
132 - Fix bug in distros such as OpenSUSE:15.2 where DW_AT_alignment isn't defined.
134 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>