From 25ad41e7b52e3ad677ad4c016698e71079403b3f Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 9 Apr 2021 19:39:15 -0300 Subject: [PATCH] pahole: Prep 1.21 Signed-off-by: Arnaldo Carvalho de Melo --- CMakeLists.txt | 4 +-- MANIFEST | 1 + NEWS | 20 ++++++++++++ changes-v1.21 | 70 ++++++++++++++++++++++++++++++++++++++++++ rpm/SPECS/dwarves.spec | 26 ++++++++++++++-- 5 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 changes-v1.21 diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f72c7a..6d4b50f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,9 +33,9 @@ set(CMAKE_C_FLAGS_DEBUG "-Wall -Werror -ggdb -O0") set(CMAKE_C_FLAGS_RELEASE "-Wall -O2") # Just for grepping, DWARVES_VERSION isn't used anywhere anymore -# add_definitions(-D_GNU_SOURCE -DDWARVES_VERSION="v1.20") +# add_definitions(-D_GNU_SOURCE -DDWARVES_VERSION="v1.21") add_definitions(-D_GNU_SOURCE -DDWARVES_MAJOR_VERSION=1) -add_definitions(-D_GNU_SOURCE -DDWARVES_MINOR_VERSION=20) +add_definitions(-D_GNU_SOURCE -DDWARVES_MINOR_VERSION=21) find_package(DWARF REQUIRED) find_package(ZLIB REQUIRED) diff --git a/MANIFEST b/MANIFEST index c964ec5..a89de32 100644 --- a/MANIFEST +++ b/MANIFEST @@ -51,6 +51,7 @@ changes-v1.17 changes-v1.18 changes-v1.19 changes-v1.20 +changes-v1.21 COPYING NEWS README diff --git a/NEWS b/NEWS index a6796ee..df7050c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,23 @@ +v1.21: + +Fri Apr 9 2021 + +ae0b7dde1fd50b12 dwarf_loader: Handle DWARF5 DW_OP_addrx properly +9adb014930f31c66 dwarf_loader: Handle subprogram ret type with abstract_origin properly +5752d1951d081a80 dwarf_loader: Check .notes section for LTO build info +209e45424ff4a22d dwarf_loader: Check .debug_abbrev for cross-CU references +39227909db3cc2c2 dwarf_loader: Permit merging all DWARF CU's for clang LTO built binary +763475ca1101ccfe dwarf_loader: Factor out common code to initialize a cu +d0d3fbd4744953e8 dwarf_loader: Permit a flexible HASHTAGS__BITS +ffe0ef4d73906c18 btf: Add --btf_gen_all flag +de708b33114d42c2 btf: Add support for the floating-point types +4b7f8c04d009942b fprintf: Honour conf_fprintf.hex when printing enumerations +f2889ff163726336 Avoid warning when building with NDEBUG +8e1f8c904e303d5d btf_encoder: Match ftrace addresses within ELF functions +9fecc77ed82d429f dwarf_loader: Use a better hashing function, from libbpf +0125de3a4c055cdf btf_encoder: Funnel ELF error reporting through a macro +7d8e829f636f47ab btf_encoder: Sanitize non-regular int base type + v1.20: Tue Feb 2 2021 diff --git a/changes-v1.21 b/changes-v1.21 new file mode 100644 index 0000000..5b148c8 --- /dev/null +++ b/changes-v1.21 @@ -0,0 +1,70 @@ +DWARF loader: + +- Handle DWARF5 DW_OP_addrx properly + + Part of the effort to support the subset of DWARF5 that is generated when building the kernel. + +- Handle subprogram ret type with abstract_origin properly + + Adds a second pass to resolve abstract origin DWARF description of functions to aid + the BTF encoder in getting the right return type. + +- Check .notes section for LTO build info + + When LTO is used, currently only with clang, we need to do extra steps to handle references + from one object (compile unit, aka CU) to another, a way for DWARF to avoid duplicating + information. + +- Check .debug_abbrev for cross-CU references + + When the kernel build process doesn't add an ELF note in vmlinux indicating that LTO was + used and thus intra-CU references are present and thus we need to use a more expensive + way to resolve types and (again) thus to encode BTF, we need to look at DWARF's .debug_abbrev + ELF section to figure out if such intra-CU references are present. + +- Permit merging all DWARF CU's for clang LTO built binary + + Allow not trowing away previously supposedly self contained compile units + (objects, aka CU, aka Compile Units) as they have type descriptions that will + be used in later CUs. + +- Permit a flexible HASHTAGS__BITS + + So that we can use a more expensive algorithm when we need to keep previously processed + compile units that will then be referenced by later ones to resolve types. + +- Use a better hashing function, from libbpf + + Enabling patch to combine compile units when using LTO. + +BTF encoder: + +- Add --btf_gen_all flag + + A new command line to allow asking for the generation of all BTF encodings, so that we + can stop adding new command line options to enable new encodings in the kernel Makefile. + +- Match ftrace addresses within ELF functions + + To cope with differences in how DWARF and ftrace describes function boundaries. + +- Funnel ELF error reporting through a macro + + To use libelf's elf_error() function, improving error messages. + +- Sanitize non-regular int base type + + Cope with clang with dwarf5 non-regular int base types, tricky stuff, see yhs + full explanation in the relevant cset. + +- Add support for the floating-point types + + S/390 has floats'n'doubles in its arch specific linux headers, cope with that. + +Pretty printer: + +- Honour conf_fprintf.hex when printing enumerations + + If the user specifies --hex in the command line, honour it when printing enumerations. + +Signed-off-by: Arnaldo Carvalho de Melo diff --git a/rpm/SPECS/dwarves.spec b/rpm/SPECS/dwarves.spec index 178d7c1..0a38b56 100644 --- a/rpm/SPECS/dwarves.spec +++ b/rpm/SPECS/dwarves.spec @@ -2,7 +2,7 @@ %define libver 1 Name: dwarves -Version: 1.20 +Version: 1.21 Release: 1%{?dist} License: GPLv2 Summary: Debugging Information Manipulation Tools (pahole & friends) @@ -79,7 +79,7 @@ rm -Rf %{buildroot} %files %doc README.ctracer %doc README.btf -%doc changes-v1.20 +%doc changes-v1.21 %doc NEWS %{_bindir}/btfdiff %{_bindir}/codiff @@ -134,7 +134,27 @@ rm -Rf %{buildroot} %{_libdir}/%{libname}_reorganize.so %changelog -* Tue Feb 2 2021 Arnaldo Carvalho de Melo - 1.20-1 +* Fri Apr 9 2021 Arnaldo Carvalho de Melo - 1.21-1 +- New release: v1.21 +- DWARF loader: +- Handle DWARF5 DW_OP_addrx properly +- Handle subprogram ret type with abstract_origin properly +- Check .notes section for LTO build info +- Check .debug_abbrev for cross-CU references +- Permit merging all DWARF CU's for clang LTO built binary +- Factor out common code to initialize a cu +- Permit a flexible HASHTAGS__BITS +- Use a better hashing function, from libbpf +- btf_encoder: +- Add --btf_gen_all flag +- Match ftrace addresses within ELF functions +- Funnel ELF error reporting through a macro +- Sanitize non-regular int base type +- Add support for the floating-point types +- Pretty printer: +- Honour conf_fprintf.hex when printing enumerations + +* Tue Feb 2 2021 Arnaldo Carvalho de Melo - 1.20-1 - New release: v1.20 - btf_encoder: - Improve ELF error reporting using elf_errmsg(elf_errno())