[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/users/serhei/try-stackprof-fixup'.
Changed from 33d2d1b543173ed4ca44d9a5d394670326eb924f to 52a43e10c45e8ca7b84121574b282f9eac2d80ae
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 bc21d5502b4072e9e221ad1c572f608673155a92 by Serhei Makarov on 03/08/2026 at 16:40..
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.

TODO(REVIEW): First iteration of this patch for RFC: the APIs are part
of libdwfl_stacktrace, and return error values on architectures that
lack a sample_regs backend (to signal that libdwflst is not yet
supported there). This is most useful for the profiler use case, but
need to double-check if it makes sense to provide a more general arch
constant API in libdwfl/libdw.

* 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_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.
* libdw/libdw.map (ELFUTILS_0.195_EXPERIMENTAL): Add the new functions.
https://invent.kde.org/qt/qt-creator/elfutils/-/commit/bc21d5502b4072e9e221ad1c572f608673155a92

Git commit 52a43e10c45e8ca7b84121574b282f9eac2d80ae by Serhei Makarov on 03/08/2026 at 16:49..
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_dwarf_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.
https://invent.kde.org/qt/qt-creator/elfutils/-/commit/52a43e10c45e8ca7b84121574b282f9eac2d80ae
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.