Re: [PATCH] perf util: take pgoff into account when reporting elf to libdwfl
From: Milian Wolff
Date: Mon Oct 29 2018 - 11:26:42 EST
On Monday, October 29, 2018 3:16:44 PM CET Milian Wolff wrote:
> Libdwfl parses an ELF file itself and creates mappings for the
> individual sections. Perf on the other hand sees raw mmap events which
> represent individual sections. When we encounter an address pointing
> into a mapping with pgoff != 0, we must take that into account and
> report the file at the non-offset base address.
> This fixes unwinding with libdwfl in some cases. E.g. for a file like:
> Note that the backtrace is still stopping too early, when
> compared to the nice results obtained via libunwind. It's
> unclear so far what the reason for that is.
The remaining issue is due to a bug in elfutils:
With both patches applied, libunwind and elfutils produce the same output for
the above scenario.
Milian Wolff | milian.wolff@xxxxxxxx | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
KDAB - The Qt, C++ and OpenGL Experts
Description: S/MIME cryptographic signature