[qt/qt-creator/elfutils]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/qt-creator/elfutils Pushed by mirror-service into branch 'upstream/main'. Changed from fb5473ac7368bbbbc2ea9d86241bd6c882e3fcb5 to 9d473aff2f7a81b3c8c78c94b818eb8354c79b26 Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit e888794b6f70cc63d405c1dbdb01613dc148b7f4 by Serhei Makarov on 13/08/2026 at 21:07.. eblinitreg_sample.c: guard ebl_set_initial_registers_sample The generic code in ebl_set_initial_registers_sample is meant to be used on arches with simple/small register files and a contiguous linear mapping of perf_regs<->dwarf_regs. Make sure to guard it with a check of ebl->perf_frame_regs_mask (the canonical sign that sample_regs is supported for this arch). Otherwise, a hypothetical call to ebl_set_initial_registers_sample() on an unsupported arch with many regs falls through to the generic code and ends up writing out of bounds to the dwarf_regs array, (at least in builds where the assert is also compiled out). Based on Sayed Kaif's patch and problem report cf https://sourceware.org/pipermail/elfutils-devel/2026q2/009378.html * libebl/eblinitreg_sample.c (ebl_set_initial_registers_sample): Guard the generic code on ebl->perf_frame_regs_mask != 0. Reported-by: Sayed Kaif <[email protected]> Signed-off-by: Serhei Makarov <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/e888794b6f70cc63d405c1dbdb01613dc148b7f4 Git commit 6b94fe269c132ac0d1b44f6b8969d674a878ef54 by Serhei Makarov on 13/08/2026 at 21:08.. configure.ac, src/: add C++20, add new stackprof tool eu-stackprof is a new tool which profiles processes on a Linux system using perf_events and outputs gprof gmon.out format program counter histograms and callgraph-arc profiles; intended as an updated demo of libdwfl_stacktrace functionality and as a data-gathering tool for the profiledb initiative. * configure.ac: Add configure checks for host CPU, C++20, eu-stackprof perf/libpfm dependencies incl. build_id in mmap2. * config/elfutils.spec.in: Add stackprof, pass --enable-stackprof or --disable-stackprof as appropriate. * po/POTFILES.in: Add stackprof.cxx. * src/Makefile.am (bin_PROGRAMS): Add stackprof. (stackprof_*): Add stackprof SOURCES, LDADD, and so forth. * src/stackprof.cxx: New file. Co-authored-by: Frank Ch. Eigler <[email protected]> Signed-off-by: Serhei Makarov <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/6b94fe269c132ac0d1b44f6b8969d674a878ef54 Git commit cf7b093764ffb32dc5227d1b89e22d5247de49c4 by Serhei Makarov on 13/08/2026 at 21:09.. tests/: add test suite for stackprof Together with the stackprof tool we add some test cases to exercise it, and the underlying libdwfl_stacktrace functionality as well. * tests/stackprof-subr.sh: Common subroutines for checking perf_events availability and verifying gmon.*.out files. * tests/run-stackprof-system.sh: New file. * tests/run-stackprof-system-gprof.sh: New file. * tests/run-stackprof-user.sh: New file. * tests/run-stackprof-user-gprof.sh: New file. * tests/Makefile.am (TESTS): add the new testcases. Co-authored-by: Frank Ch. Eigler <[email protected]> Signed-off-by: Serhei Makarov <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/cf7b093764ffb32dc5227d1b89e22d5247de49c4 Git commit 89a4cbe4330d1a357c0fd3afc100b5331fccb813 by Serhei Makarov on 13/08/2026 at 21:09.. doc/stackprof.1: add man page and NEWS for stackprof * doc/Makefile.am (dist_man1_MANS): Add stackprof.1. * doc/stackprof.1: New file. * NEWS: Add stackprof. Co-authored-by: Frank Ch. Eigler <[email protected]> Signed-off-by: Serhei Makarov <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/89a4cbe4330d1a357c0fd3afc100b5331fccb813 Git commit 4d16224560556b2daccf4214e4a9009b15a585bb by Serhei Makarov on 13/08/2026 at 21:09.. src/stacktrace.c: remove in favour of stackprof Now that stackprof is added, the existing src/stacktrace.c tool is officially obsolete as a demo -- it relies on a custom patchset for Sysprof (communicating via pipe, not contributed to mainline, in favour of the sysprof-live-unwinder tool which links elfutils as a library), whereas stackprof pulls data from perf_events directly. Likewise, stackprof includes all of the eu-stacktrace functionality for logging/statistics. * configure.ac: Remove eu-stacktrace related bits. The configure checks for stackprof are simpler (just perf_events.h and libpfm). * config/elfutils.spec.in: Remove eu-stacktrace. * po/POTFILES.in: Remove stacktrace.c. * src/Makefile.am: Remove eu-stacktrace related bits. * src/stacktrace.c: Remove. * .forgejo/workflows/check-fedora.yaml: Remove sysprof-capture-devel. Co-authored-by: Frank Ch. Eigler <[email protected]> Signed-off-by: Serhei Makarov <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/4d16224560556b2daccf4214e4a9009b15a585bb Git commit 0ffae1cc8568f745789bdf7b8561ac5d6c0fc12a by Serhei Makarov on 13/08/2026 at 21:09.. PR34498 libdwfl_stacktace/dwflst_sample_frame.c: API for per-arch constants One need identified from implementing patches for downstream profiling tools to adopt libdwfl_stacktrace is that libebl per-architecture constants are not exposed to external projects. This makes handling stack pointer especially tricky, as shown by the incorrect prior eu-stacktrace logic cf PR34498, since the profiler has to account for how perf_regs mask might alter the position. * libdwfl_stacktrace/libdwfl_stacktrace.h (dwflst_arch_from_uname): New API, translates umachine str obtained from uname() -> struct utsname -> machine to ELF machine ID. (dwflst_arch_sp_dwarf_reg): New API, identifies index of stack ptr. (dwflst_arch_sp_perf_reg): New API, identifies index of stack ptr in perf_events regs[] array given a perf_regs_mask (cf PR34498). (dwflst_arch_expected_frame_nregs): New API, minimal number of regs for unwinding (useful for sanity-checking incoming stack samples). * libdwfl_stacktrace/dwflst_sample_frame.c: Format in two sections. (dwflst_arch_from_uname): Implementation. (dwflst_arch_expected_frame_nregs): Implementation. (dwflst_arch_sp_dwarf_reg): Implementation. (dwflst_arch_sp_perf_reg): Implementation. * libdw/libdw.map (ELFUTILS_0.196_EXPERIMENTAL): Add the new functions. Signed-off-by: Serhei Makarov <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/0ffae1cc8568f745789bdf7b8561ac5d6c0fc12a Git commit 0a56ff4c8b548dd5545501bc2b98d75c33828f5a by Serhei Makarov on 13/08/2026 at 21:09.. PR34498 stackprof: adopt new libdwflst API for per-arch constants This tidies up the architecture-handling code and shows how a profiler project outside of Elfutils codebase (no access to libebl) can use the new libdwflst API to accomplish what stackprof does. * src/stackprof.cxx (class PerfConsumerUnwinder): Remove get_sp_reg. (PerfReader::PerfReader): Use dwflst_arch_from_uname for ELF arch ID. (expected_frame_nregs): Remove. (PerfConsumerUnwinder::find_dwfl): Additional bounds check on sp, use dwflst_arch_expected_frame_nregs and dwflst_arch_sp_perf_reg for per-architecture values. (PerfConsumerUnwinder::get_sp_reg): Remove. (PerfConsumerUnwinder::unwind_frame_cb): Additional bounds check on sp, use dwflst_arch_sp_dwarf_reg for per-architecture value. Signed-off-by: Serhei Makarov <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/0a56ff4c8b548dd5545501bc2b98d75c33828f5a Git commit ed2d0ae845573b50300a87b4fe7a1b9cf2d1cc3f by Aaron Merey (on behalf of Tiago de Paula) on 13/08/2026 at 23:09.. config: guard against unset variables in profile.sh Use an equivalent default value that allows profile.sh to be loaded in scripts with strict options ('-euo pipefail') even when not all debuginfod variables are defined. Both '${parameter:-[word]}' and 'set -u' are defined in POSIX Shell & Utilities. * config/profile.sh.in: add fallbacks in variable expansions * tests/run-debuginfod-client-profile.sh: add set -u Signed-off-by: Tiago de Paula <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/ed2d0ae845573b50300a87b4fe7a1b9cf2d1cc3f Git commit 9d473aff2f7a81b3c8c78c94b818eb8354c79b26 by Aaron Merey (on behalf of Pengfei Li) on 13/08/2026 at 23:13.. libdwfl: Handle kernel module sections absent from sysfs dwfl_linux_kernel_module_section_address reads loaded kernel module section addresses from /sys/module/<name>/sections. Some sections in the module ELF intentionally have no corresponding sysfs file. The kernel clears SHF_ALLOC from __versions, __version_ext_crcs, and __version_ext_names before laying out a module. It also clears SHF_ALLOC from .data..percpu because that section is allocated separately, and skips zero-sized sections when creating the module section sysfs attributes. Treat those sections as absent from the normal runtime section layout when opening their sysfs files fails with ENOENT. Keep accepting the existing .data.percpu spelling while also accepting the .data..percpu spelling used by current kernels. Other errors and missing nonzero sections continue to abort the callback. Add a regression test that calls the callback with a nonexistent per-process module name. It covers the existing special cases, the three module version sections, .data..percpu, a zero-sized section, and the failure path for an unknown nonzero section. Tested on Ubuntu x86-64 with: make check TESTS=dwfl-kernel-module-section-address https://sourceware.org/bugzilla/show_bug.cgi?id=34030 * libdwfl/linux-kernel-modules.c (dwfl_linux_kernel_module_section_address): Handle module version sections, .data..percpu, and zero-sized sections missing from sysfs. * tests/dwfl-kernel-module-section-address.c: New test. * tests/Makefile.am (check_PROGRAMS, TESTS): Add it. (dwfl_kernel_module_section_address_LDADD): New variable. Signed-off-by: Pengfei Li <[email protected]> https://invent.kde.org/qt/qt-creator/elfutils/-/commit/9d473aff2f7a81b3c8c78c94b818eb8354c79b26