Re: [PATCH 01/13] libebl [1/13]: api for perf register handling, start with x86_64

2025-03-19 Thread Mark Wielaard
Hi Serhei, On Sun, 2025-03-16 at 19:12 -0400, Serhei Makarov wrote: > First patch of a series that reworks eu-stacktrace functionality > into a library interface for other profiling tools. > > * * * > > As it happens, Linux perf_events and DWARF can prescribe completely > different layouts for t

Re: [PATCH 03/13] libebl [3/13]: eu-stacktrace: use new register handling api

2025-03-19 Thread Mark Wielaard
Hi Serhei, On Sun, Mar 16, 2025 at 07:13:41PM -0400, Serhei Makarov wrote: > Change the sample_set_initial_registers callback in eu-stacktrace to > use the proper libebl ebl_set_initial_registers_sample function. > > * src/Makefile.am (stacktrace_LDADD): Add libebl. > * src/stacktrace.c (sample_r

Re: [PATCH 04/13] libdwfl [4/13]: add dwfl_perf_sample_preferred_regs_mask

2025-03-19 Thread Mark Wielaard
Hi Serhei, On Sun, Mar 16, 2025 at 07:14:11PM -0400, Serhei Makarov wrote: > Since libebl is a private interface, subsequent patches in the series > introduce another api wrapping the libebl perf register handling. In > this patch, add an interface to access the preferred set of registers > that

[Bug general/29571] Add 'Key to Flags' to eu-readelf output

2025-03-19 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29571 --- Comment #7 from Mark Wielaard --- (In reply to Sam Zeter from comment #6) > I also noticed in libelf/elf.h that we define these flags but do not print > them in readelf: > > #define SHF_MASKOS 0x0ff0 /* OS-specific. */ > #def

Re: [PATCH] Add 'Key to Flags' to eu-readelf output [bz 29571]

2025-03-19 Thread Mark Wielaard
Hi Samuel, On Mon, 2025-03-17 at 17:39 +1000, Samuel Zeter wrote: > When printing section headers, also include a key to what each flag > is at the end of the section header output. Did you run make check after your patch? It seems various tests fail because they aren't expecting the new flag inf

Re: Question about elf symbol's file offset

2025-03-19 Thread Mark Wielaard
Hi Hengqi, On Tue, 2025-03-11 at 13:27 +0800, Hengqi Chen wrote: > I want to ask you a question regarding elf internals. > How to calculate a symbol's file offset (which is kernel uprobe expects) > in an elf (executable or shared object)? Could you point me to a description of what uprobe expects

[PATCH] libdwfl: resolve all paths relative to sysroot

2025-03-19 Thread Michal Sekletar
Whenever possible, resolve all symlinks as if the sysroot path were a chroot environment. This prevents potential interactions with files from the host filesystem. Signed-off-by: Michal Sekletar --- configure.ac | 17 + libdwfl/dwfl_segment_report_module.c