Skip to content

Commit 1cb4202

Browse files
committed
Prep 1.28
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 3ddadc1 commit 1cb4202

File tree

5 files changed

+269
-4
lines changed

5 files changed

+269
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if (NOT DEFINED BUILD_SHARED_LIBS)
4545
endif (NOT DEFINED BUILD_SHARED_LIBS)
4646

4747
# Just for grepping, DWARVES_VERSION isn't used anywhere anymore
48-
# add_definitions(-D_GNU_SOURCE -DDWARVES_VERSION="v1.27")
48+
# add_definitions(-D_GNU_SOURCE -DDWARVES_VERSION="v1.28")
4949
add_definitions(-D_GNU_SOURCE -DDWARVES_MAJOR_VERSION=1)
50-
add_definitions(-D_GNU_SOURCE -DDWARVES_MINOR_VERSION=27)
50+
add_definitions(-D_GNU_SOURCE -DDWARVES_MINOR_VERSION=28)
5151
find_package(DWARF REQUIRED)
5252
find_package(ZLIB REQUIRED)
5353
find_package(argp REQUIRED)

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ changes-v1.24
5656
changes-v1.25
5757
changes-v1.26
5858
changes-v1.27
59+
changes-v1.28
5960
buildcmd.sh
6061
COPYING
6162
NEWS

NEWS

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,126 @@
1+
v1.28
2+
3+
3ddadc131586d6f3 btf_encoder: handle .BTF_ids section endianness
4+
12ca11281912c272 CMakeLists.txt: Require cmake 3.5 or higher
5+
a2abd948216237de CMakeList.txt: Respect CMAKE_INSTALL_LIBDIR
6+
98d1f018a8fc3fc3 tests default_vmlinux_btf: Cover the no args segfault too
7+
031495f8a4b193bf tests default_vmlinux_btf: Introduce test for using BTF by default
8+
9374bf455e5dcfab core, libctf: Check if constructor arguments are NULL before using them
9+
e843385b66522ecb pahole: Honour exclusive BTF loading
10+
ce69ca108201836d core: Add method to get the vmlinux BTF filename, allow overriding it via env var
11+
65b7fd68ccbb4990 dwarf_loader: Use libdw__lock for dwarf_getlocation(s)
12+
da2f7e56e7a69063 dwarf_loader: Check DW_OP_[GNU_]entry_value for possible parameter matching
13+
6b4d0e4fab8c66cf pahole: Sync with released libbpf-1.5
14+
729fd9963df576a0 pahole: Distilled_base btf_feature should be reported for libbpf > 1.5
15+
58ba3891baf6285c tests/flexible_arrays: Print flex array struct from same vmlinux
16+
b77d88003eb53fa1 btf_encoder: Use the ELF_C_READ_MMAP mode with elf_begin()
17+
11b59c00770dbe26 tests/btf_functions: Redirect stderr for pfunct --format_path=btf
18+
0ee47254eae5ae26 btf_loader: Send warnings to stderr
19+
e91433cb3bb5bf58 tests: Use PAHOLE_LANG_EXCLUDE=rust to skip Rust CUs
20+
97f2f7ba05508273 pfunct: Use languages__init() to honour PAHOLE_LANG_EXCLUDE
21+
cbb1149c4eaf01b1 languages: Introduce languages__cu_filtered() from pahole's cu__filter()
22+
fa7458521b6e421f languages: Use PAHOLE_LANG_EXCLUDE env var if present, as a fallback
23+
1f25386486e4d7b5 languages: Introduce language__init()
24+
8fc09fd3315ce934 core: Adopt the languages__parse(), languages__in() and 'struct languages' from pahole
25+
b9a0283d24fe31c5 languages: Start making 'struct languages' a class
26+
d9c3609d5eac98cd pahole: Add the tool name to languages_parse()
27+
34269334c76fb690 dwarf_loader: Print the CU's language when a tag isn't supported
28+
fb539071a5731788 tests: Exclude rust CUs when encoding BTF
29+
4c6a4d39eb0e6489 btf_encoder: Filter var names before btf name check
30+
6096a8dcdd744000 core: Add the debuginfod client cache directory to the vmlinux search path
31+
91bcd1d43e23e956 tests: Add a test for the accounting of flexible arrays
32+
6ab5318f536927cb fprintf: Show statistics about members with flexible arrays
33+
b1a4297aefe6f767 fprintf: Differentiate embedded flexible arrays from flexible arrays
34+
446c28d118b97380 pahole: Introduce --with_embedded_flexible_array
35+
9b838b824e6b4153 fprintf: Add a comment if a member type has an embedded flexible array
36+
5485b3cf799cfca2 core: Introduce class__has_embedded_flexible_array()
37+
0d62f2fdf3faf625 core: Cache info about flexible arrays in class__has_flexible_array()
38+
86c2461c7505f669 core: Move class__has_flexible_array() from pahole to the core
39+
d580a45c694b158a pahole: Add global_var BTF feature
40+
ff34e733a0c23bf4 btf_encoder: Allow encoding VARs from many sections
41+
5b5238c0aaff1dfd btf_encoder: Explicitly check addr/size for u32 overflow
42+
47dcb534e25313b2 btf_encoder: Stop indexing symbols for VARs
43+
4536d74db7ad5378 btf_encoder: Use bitfield to control var encoding
44+
d08775c932525c76 tests/btf_functions: reduce verbosity of test
45+
876f9c6fad88007f tests/reproducible_build: Fix vmlinux finding logic
46+
2b3595765dfd2837 tests reproducible_build.sh: Try first to find a vmlinux using pahole --running_kernel_vmlinux
47+
3a29b13291b1516a pahole: Show the CUs that are filtered via --lang_exclude when in verbose mode:
48+
19460635885cf32c core: Add a id -> string for DWARF language codes
49+
b98565e7b17ec24d dwarf_loader: Honour --lang_exclude when merging LTO built CUs
50+
7a2b5008d9713334 core: Constify cu->name
51+
6a275a088f90cba8 btf_encoder: Cache all ELF section info
52+
1c5f0f53f1d094a5 dwarf_loader: Add "artificial" and "top_level" variable flags
53+
ef01f78f693a4b3e dutil: Return ELF section name when looked up by index
54+
135b37a04ce5a440 tests: Distinguish between failed/skipped tests
55+
57e485cf1cac88a9 tests/reproducible_build: Return 2 (skipped) if no vmlinux available
56+
5ea9d3fbccb2b185 tests/btf_functions: Return 2 to indicate test had to be skipped
57+
8344141695722f5f tests/reproducible_builds: Support envvar-specified vmlinux
58+
c06310c689fe842a pahole: Generate "bpf_fastcall" decl tags for eligible kfuncs
59+
dafd8e085f31d05b tests: Improve btf_functions.sh by reducing greps/pipes
60+
4d3e050c1871e98d btf_encoder: Fix strncpy issues, other issues identified in code review
61+
0a3b73d6a5fc3c64 pahole: Add --padding N to show only structs with N bytes of padding at its end
62+
dfc38c09ce4f94bf pahole: Add --padding_ge N to show only structs with at least N bytes of padding at its end
63+
b56cf57f25daf880 tests: Add test validating BTF encoding, reasons we skip functions
64+
6b199c39c9320fc2 pfunct: Show all functions that match filter criteria
65+
4bff1141bb48ae58 btf_encoder: Record BTF-centric function state instead of DWARF-centric
66+
84ab4532efe4e263 dwarf_loader: Fix memleaks in creating cus
67+
a4f5f07ea0f3ba92 pahole: Sync with latest in-progress libbpf-1.5
68+
fd14dc67cb6aaead tests prettify_perf.data: Add regression test for 'pahole --prettify'
69+
2282d7df4d99cfdd tests: Add script to enumerate and run regression tests in the tests/ dir
70+
ba38e1567bc43f7a tests reproducible_build: Try to find the running kernel vmlinux if ran without args
71+
ea1865cf7a109806 pahole: Add option to obtain a vmlinux matching the running kernel
72+
c08046f98a3f8488 core: Add function to return the path to the running kernel vmlinux
73+
1dfd141fafd40d63 pfunct: Print DW_AT_external=1 functions once
74+
e3fda2668a8cebf0 pahole: Reduce memory usage by smarter deleting of CUs
75+
c7b1f6a29ba15a5d btf_encoder: Add "distilled_base" BTF feature to split BTF generation
76+
b6def578aa4a631f pahole: Sync with libbpf-1.5
77+
d744d859768d6951 pahole: Do --lang_exclude CU filtering earlier
78+
81661fa60f83c7f1 dwarf_loader: Allow filtering CUs early in loading
79+
52ac9a728dc1c575 pahole: Only warn about multithreading not being available with older versions of elfutils in verbose mode
80+
97de8fb828c198cd dwarf_loader: Simplify the tag__alloc() routine
81+
bc50242950bb8975 dwarf_loader: Do just one alloc for 'struct dwarf_tag + struct tag'
82+
799cbfb7d8297b84 dwarf_loader: All tags loaded from DWARF must be accompanied by a 'struct dwarf_tag'
83+
cb3ce1212903aca2 core: Cloning classes should use the CU specific allocator
84+
c2f89dab3f2b0ebb core: Introduce per tag alloc method
85+
e42b8738a5063696 dwarf_loader: Provide a tag__free() callback
86+
d349997698d7698c core: Introduce per-type tag free callback
87+
6dfb51cb87c9474c core: Make destructors receive the 'struct cu' their object may have been allocated from
88+
ce3540e995605d80 dwarf_loader: Things allocated with tag__alloc() must be freed with tag__free()
89+
ca764e65ffbc74ca dwarf_loader: Memory allocated with cu__zalloc() should be freed with cu__free()
90+
3ef508ad94012933 dwarf_loader: Make 'struct dwarf_tag' more compact by getting rid of 'struct dwarf_off_ref'
91+
70febc8858588348 core: Reorganize 'struct class_member' to save 8 bytes
92+
76bcb88a67556468 core: Make tag->recursivity_level a uint8_t
93+
b8b9e04d177d8eb7 core: Make tag->top_level a single bit flag
94+
539acefcdd5b0f71 core: Make tag->has_btf_type_tag a single bit flag
95+
dba2c2c1aa5dfa05 core: Make tag->visited a single bit flag
96+
7409cfadcae0253b core: Shrink 'struct namespace' a bit by using a hole in its embedded 'tag'
97+
01646d9df0ca40e2 core: Add namespace__shared_tags() method
98+
811a5499b11bd5fa core: type->suffix_disambiguation can be part of a bitfield
99+
39a28ea592075f0e btf_encoder: Log libbpf errors when they cause encoding errors
100+
15f4a8363dfcb7d4 core: 'struct namespaces'->nr_tags isn't used, ditch it
101+
638c000bd64456d6 dwarf_loader: Replace the dtag specific method with tag__set_spec()
102+
7aae38999c2ce548 dwarf_loader: Ditch dwarf_tag__spec() as we have dtag->specification
103+
c0a78bcfd628302b dwarf_loader: Remove 'struct dwarf_tag' variable size
104+
0364eb68d3802d4c core: Add accessor to the tag associated with a dwarf_tag
105+
745db05e36546d9a core: Add accessor to the dwarf_tag associated with a tag
106+
7c59cbdf149a1b45 fprintf: Fix identation in closing } on namespace fprintf
107+
fbf77d8d44e507a2 pdwtags: Print namespaces and its contents
108+
2a5ea3e4e5e0606f core: Add namespace iterator
109+
5563b1c0e31c7e29 dwarf_loader: Add support for DW_TAG_GNU_formal_parameter_pack
110+
1ecb5bd1a60a85e6 dwarf_loader: Add support for DW_TAG_GNU_template_parameter_pack
111+
f524f2ed5873e664 dwarf_loader: Make cu__tag_not_handled() generally available
112+
3b637ea23ee81872 dwarf_loader: Initial support for DW_TAG_template_value_param tag
113+
ab31cd26d44e3619 dwarf_loader: Initial support for DW_TAG_template_type_param tag on DW_TAG_subprogram
114+
8a1e0238ee4005a6 dwarf_loader: Initial support for DW_TAG_template_type_param tag
115+
24009d1fa48ce381 dwarf_loader: Hash DW_TAG_enumerator entries
116+
693522ee3a947d73 core: Ignore DW_TAG_inheritance with byte_size zero when finding holes
117+
43f9515d82114987 dwarf_loader: Print the DWARF offset in tag__print_unsupported_tag()
118+
e82a0fdcfb8ea0ce dwarf_loader: Simplify tag__print_not_supported()
119+
f7e3f0942fedb945 pahole: Bail out when not finding debug anywhere
120+
94a01bde592c555b dwarf_loader: Add missing cus__add(cus, cu) to cus__merge_and_process_cu()
121+
6a2b27c0f512619b core: Initialize cu->node with INIT_LIST_HEAD()
122+
0ce7745fa46da0ff PKG-MAINTAINERS: Add maintainer for nixpkgs package
123+
1124
v1.27
2125

3126
Tue Jun 11 2024

changes-v1.28

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
pahole:
2+
3+
- Various improvements to reduce the memory footprint of pahole, notably when
4+
doing BTF encoding.
5+
6+
- Show flexible arrays statistics, it detects them at the end of member types,
7+
in the middle, etc. This should help with the efforts to spot problematic
8+
usage of flexible arrays in the kernel sources, examples:
9+
10+
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=6ab5318f536927cb
11+
12+
- Introduce --with_embedded_flexible_array option.
13+
14+
- Add '--padding N' to show only structs with N bytes of padding.
15+
16+
- Add '--padding_ge N' to show only structs with at least N bytes of padding.
17+
18+
- Introduce --running_kernel_vmlinux to find a vmlinux that matches the
19+
build-id of the running kernel, e.g.:
20+
21+
$ pahole --running_kernel_vmlinux
22+
/usr/lib/debug/lib/modules/6.11.7-200.fc40.x86_64/vmlinux
23+
$ rpm -qf /usr/lib/debug/lib/modules/6.11.7-200.fc40.x86_64/vmlinux
24+
kernel-debuginfo-6.11.7-200.fc40.x86_64
25+
$
26+
27+
This is a shortcut to find the right vmlinux to use for the running kernel
28+
and helps with regression tests.
29+
30+
pfunct:
31+
32+
- Don't stop at the first function that matches a filter, show all of them.
33+
34+
BTF Encoder:
35+
36+
- Allow encoding data about all global variables, not just per CPU ones.
37+
38+
There are several reasons why type information for all global variables to be
39+
useful in the kernel, including drgn without DWARF, __ksym BPF programs return
40+
type.
41+
42+
This is non-default, experiment with it using 'pahole --btf-features=+global_var'
43+
44+
- Handle .BTF_ids section endianness, allowing for cross builds involving
45+
machines with different endianness to work.
46+
47+
For instance, encoding BTF info on a s390 vmlinux file on a x86_64 workstation.
48+
49+
- Generate decl tags for bpf_fastcall for eligible kfuncs.
50+
51+
- Add "distilled_base" BTF feature to split BTF generation.
52+
53+
- Use the ELF_C_READ_MMAP mode with libelf, reducing peak memory utilization.
54+
55+
BTF Loader:
56+
57+
- Allow overiding /sys/kernel/btf/vmlinux with some other file, for testing,
58+
via the PAHOLE_VMLINUX_BTF_FILENAME environment variable.
59+
60+
DWARF loader:
61+
62+
- Allow setting the list of compile units produced from languages to skip via
63+
the PAHOLE_LANG_EXCLUDE environment variable.
64+
65+
- Serialize access to elfutils dwarf_getlocation() to avoid elfutils internal
66+
data structure corruption when running multithreaded pahole.
67+
68+
- Honour --lang_exclude when merging LTO built CUs.
69+
70+
- Add the debuginfod client cache directory to the vmlinux search path.
71+
72+
- Print the CU's language when a tag isn't supported.
73+
74+
- Initial support for the DW_TAG_GNU_formal_parameter_pack,
75+
DW_TAG_GNU_template_parameter_pack, DW_TAG_template_value_param and
76+
DW_TAG_template_type_param DWARF tags.
77+
78+
- Improve the parameter parsing by checking DW_OP_[GNU_]entry_value, this
79+
makes some more functions to be made eligible by the BTF encoder, for instance
80+
the perf_event_read() in the 6.11 kernel.
81+
82+
Core:
83+
84+
- Use pahole to help in reorganizing its data structures to reduce its memory
85+
footprint.
86+
87+
Regression tests:
88+
89+
- Introduce a tests/ directory for adding regression tests, run it with:
90+
91+
$ tests/tests
92+
93+
Or run the individual tests directly.
94+
95+
- Add a regression test for the reproducible build feature that establishes
96+
as a baseline a detached BTF file without asking for a reproducible build and
97+
then compares the output of 'bpftool btf dump file' for this file with the one
98+
from BTF reproducible build encodings done with a growing number or threads.
99+
100+
- Add a regression test for the flexible arrays features, checking if the various
101+
comments about flexible arrays match the statistics at the final of the pahole
102+
pretty print output.
103+
104+
- Add a test that checks if pahole fails when running on a BTF system and BTF was
105+
requested, previously it was falling back to DWARF silently.
106+
107+
- Add test validating BTF encoding, reasons we skip functions: DWARF functions
108+
that made it into BTF match signatures, functions we say we skipped, we did
109+
indeed skip them in BTF encoding and that it was correct to skip these
110+
functions.
111+
112+
- Add regression test for 'pahole --prettify' that uses perf to record a simple
113+
workload and then pretty print the resulting perf.data file to check that what
114+
is produced are the expected records for such a file.
115+
116+
Link: https://lore.kernel.org/all/Z0jVLcpgyENlGg6E@x1/
117+
Tested-by: Alan Maguire <[email protected]>
118+
Tested-by: Jiri Olsa <[email protected]>
119+
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>

rpm/SPECS/dwarves.spec

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%define libver 1
33

44
Name: dwarves
5-
Version: 1.27
5+
Version: 1.28
66
Release: 1%{?dist}
77
License: GPL-2.0-only
88
Summary: Debugging Information Manipulation Tools (pahole & friends)
@@ -79,7 +79,7 @@ rm -Rf %{buildroot}
7979
%files
8080
%doc README.ctracer
8181
%doc README.btf
82-
%doc changes-v1.27
82+
%doc changes-v1.28
8383
%doc NEWS
8484
%{_bindir}/btfdiff
8585
%{_bindir}/codiff
@@ -131,6 +131,28 @@ rm -Rf %{buildroot}
131131
%{_libdir}/%{libname}_reorganize.so
132132

133133
%changelog
134+
* Fri Dec 6 2024 Arnaldo Carvalho de Melo <[email protected]> - 1.28-1
135+
- New release: 1.28
136+
- Various improvements to reduce the memory footprint of pahole, notably when doing BTF encoding.
137+
- Show flexible arrays statistics
138+
- Add '--padding N' and '--padding_ge N' to show structs with paddings
139+
- Introduce --running_kernel_vmlinux to find a vmlinux that matches the build-id of the running kernel.
140+
- Don't stop pfunct output at the first function that matches a filter, show all of them
141+
- Allow encoding data about all global variables, not just per CPU ones
142+
- Handle .BTF_ids section endianness, fully supporting cross builds
143+
- Generate decl tags for bpf_fastcall for eligible kfuncs
144+
- Add "distilled_base" BTF feature to split BTF generation.
145+
- Use the ELF_C_READ_MMAP mode with libelf, reducing peak memory utilization
146+
- Allow overriding /sys/kernel/btf/vmlinux via the PAHOLE_VMLINUX_BTF_FILENAME env var
147+
- Allow setting the list of compile units via PAHOLE_LANG_EXCLUDE env var
148+
- Serialize access to elfutils dwarf_getlocation().
149+
- Honour --lang_exclude when merging LTO built CUs.
150+
- Add the debuginfod client cache directory to the vmlinux search path.
151+
- Print the CU's language when a tag isn't supported.
152+
- Initial support for GNU_formal_parameter_pack, GNU_template_parameter_pack, template_value_param and template_type_param DWARF tags.
153+
- Improve the parameter parsing by checking DW_OP_[GNU_]entry_value
154+
- Introduce a tests/ directory with regression tests
155+
134156
* Tue Jun 11 2024 Arnaldo Carvalho de Melo <[email protected]> - 1.27-1
135157
- New release: v1.27
136158
- Reproducible parallel builds: multiple runs with different number of loading/encoding threads produce the same result.

0 commit comments

Comments
 (0)