On Thu, Oct 17, 2024 at 2:53 PM Serhei Makarov <ser...@serhei.io> wrote: > > Track the method used to unwind each Dwfl_Frame using an enum field > unwound_source; provide access to the field. Then use that in > eu-stacktrace to display the unwind methods used for each process. > > This is an important diagnostic to verify how many processes are > adequately covered by the eh_frame unwinder. > > * libdw/libdw.map (ELFUTILS_0.192): Add dwfl_frame_unwound_source, > dwfl_unwound_source_str. > * libdwfl/libdwfl.h (Dwfl_Unwound_Source): New enum. > (dwfl_frame_unwound_source) > (dwfl_unwound_source_str): New functions. > * libdwfl/dwfl_frame.c (dwfl_frame_unwound_source) > (dwfl_unwound_source_str): New functions. > * libdwfl/libdwflP.h: Add INTDECL for dwfl_frame_unwound_source, > dwfl_unwound_source_str. > (struct Dwfl_Frame): Add unwound_source field. > * libdwfl/frame_unwind.c (__libdwfl_frame_unwind): Set > state->unwound_source depending on the unwind method used. > * src/stacktrace.c (struct sysprof_unwind_info): Add last_pid > field to provide access to the current sample's dwfltab entry. > (sysprof_unwind_frame_cb): Add unwound_source to the data displayed > with the show_frames option. > (sysprof_unwind_cb): Set last_pid when processing a sample. > (main): Add unwind_source to the data displayed in the final summary > table. > > Signed-off-by: Serhei Makarov <ser...@serhei.io>
LGTM, please merge. Thanks, Aaron