[PATCH 0/1] [SRU] [B/master] perf report can't annotate
Paolo Pisati
paolo.pisati at canonical.com
Fri Jan 25 15:21:26 UTC 2019
BugLink: https://bugs.launchpad.net/bugs/1675949
Impact:
Under some condition, 'perf report' is unable to show the assembly code
of a kernel function (perf report -> select a kernel function ->
annotate).
This is not an issue of the kernel itself or the perf tool, instead it's
the environment that is missing the objdump binary (and perf,
unfortunately, doesn't print any error about it).
Make sure binutils is not installed, or move away the objdump binary:
# mv /usr/bin/objdump /usr/bin/objdump.foo
Run a perf session and write down all events:
# perf record -a -- sleep 10
# perf report
select a kernel function, press 'Annotate', a blank screen will appear
(instead of the assembly code).
Now put the objdump binary back (or install binutils):
# mv /usr/bin/objdump.foo /usr/bin/objdump
and run again perf report:
# perf report
select a kernel function, annotate, the disassembly will show up.
Reproduced on Xenial/x86-64 and Bionic/arm64, but it probably affects
all series where linux-tools/perf is shipped, and all arches - the
original LP bug mentioned Xenial, Zesty, Artful and Bionic.
Fix:
Make binutils a Depends in SRCPKGNAME-tools-PKGVER-ABINUM - see the
attached patch.
How to test:
Install a patched linux-tools-PKGVER-ABINUM.deb package: it will require
binutils.
Regression:
We are adding a new dependency on a package, so code wise there's no
regression potential - on the other hand, image creation, or development
environments will experience a slight increase in size (1.8MB on x86-64
and 2.1M on arm64) if they didn't install binutils already.
The patch applies cleanly on Bionic/master, but it requires some trivial
contextual adaption on other series.
Paolo Pisati (1):
UBUNTU: [Packaging] SRCPKGNAME-tools-PKGVER-ABINUM: add binutils to
Depends
debian.master/control.stub.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.17.1
More information about the kernel-team
mailing list