linux-tools: can perf be linked against libbfd, maybe statically?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The perf tool has an optional dependency on libbfd. Per Debian policy, and due to some situation involving parallel installations of this library, no packages should link dynamically against libbfd. In the past, bugs have been filed to link perf statically against libbfd in bug 783660 (from 2011) and then to just not link against it at all in bug 1748922 (from 2018) and bug 1828234 (from 2019). The argument was made that perf does not need this dependency, as perf can use libiberty as an alternative to demangle C++ names.
However, that is not the only thing perf is using libbfd for: the other is to implement an inlined version of addr2line. This was part of an important patchset from 2013 that strove to improve the performance of perf. In my case, I ran my program for all of 30 seconds, generating a 163M large trace, and have been waiting almost an hour for the events to process... and it is only a third of the way done; what I see it doing is spawning, over and over and over again, addr2line, which it wouldn't do if linked against libbfd.
https:/
Is it possible to link perf statically against libbfd, in order to let it use the in-process implementation of addr2line? That is the solution that I've understood for other packages, such as oprofile in bug 426614 and bug 588033. Doing a quick grep of the code of perf for HAVE_LIBBFD_
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1894407
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.