On 16/10/25 01:28, Pierrick Bouvier wrote:
Enhance uftrace_symbols.py to generate .dbg files, containing source location for every symbol present in .sym file. It allows to use `uftrace {replay,dump} --srcline` and show origin of functions, connecting trace to original source code.It was first implemented with pyelftools DWARF parser, which was way too slow (~minutes) to get locations for every symbol in the linux kernel. Thus, we use `addr2line` instead, which runs in seconds. As well, there were some bugs with latest pyelftools release, requiring to run master version, which is not installable with pip. Thus, since we now require binutils (addr2line), we can ditch pyelftools based implementation and simply rely on `nm` to get symbols information, which is faster and better. Signed-off-by: Pierrick Bouvier <[email protected]> --- contrib/plugins/uftrace_symbols.py | 116 +++++++++++++++++++---------- 1 file changed, 76 insertions(+), 40 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
