Re: [PATCH v1] perf addr2line: Add a libdw implementation
From: Tony Jones
Date: Thu Dec 11 2025 - 18:35:32 EST
On Thu, Nov 27, 2025 at 12:16:29PM +0000, James Clark wrote:
> If the llvm addr2line implementation is also supposed to be slow, it just
> means we're trading speed with accuracy with this change. Hard to say what
> the default should be in that case.
I originally inquired about this (and was going to code up a patch
using libdw but Ian beat me to it) as we had a customer bug
complaining about the performance of the binutils (/usr/bin/addr2line)
forking solution and llvm isn't presently an option for us.
Using the forked addr2line the customer data set takes real: 54m15.023s
user: 40m57.719s sys: 11m22.461s for perf script -F ip,srcline (with
numerous time-out errors).
Versus real: 6m6.598s user: 5m32.603s sys: 0m1.768s with this
proposed libdw patch.
I'm also unfortunately seeing similar wrong file/line# issues. This
said I think given that libdw is being used anyways and how poor the
/usr/bin/addr2line performance is that it's worth digging deeper into
what the issues are with libdw.
I'll try to look at it some more next week.
Thanks for the patch Ian!
Tony
---------
Tony Jones
SUSE Kernel Performance Team