]> www.infradead.org Git - linux.git/commit
scripts/faddr2line: Invoke addr2line as a single long-running process
authorBrian Johannesmeyer <bjohannesmeyer@gmail.com>
Mon, 15 Apr 2024 14:55:36 +0000 (16:55 +0200)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 3 Jul 2024 06:38:36 +0000 (23:38 -0700)
commite36b69e918112430ee53e24238bb87f5146f9acf
treeb4d53e6b849049d4e680c231b97aa75a00e780e1
parent5b280de46d2bcea9def0dd84b1e86f8b42ca70b9
scripts/faddr2line: Invoke addr2line as a single long-running process

Rather than invoking a separate addr2line process for each address, invoke
a single addr2line coprocess, and pass each address to its stdin. Previous
work [0] applied a similar change to perf, leading to a ~60x speed-up [1].

If using an object file that is _not_ vmlinux, faddr2line passes a section
name argument to addr2line. Because we do not know until runtime which
section names will be passed to addr2line, we cannot apply this change to
non-vmlinux object files. Hence, it only applies to vmlinux.

[0] commit be8ecc57f180 ("perf srcline: Use long-running addr2line per
DSO")
[1] Link:
https://eighty-twenty.org/2021/09/09/perf-addr2line-speed-improvement

Signed-off-by: Brian Johannesmeyer <bjohannesmeyer@gmail.com>
Link: https://lore.kernel.org/r/20240415145538.1938745-6-bjohannesmeyer@gmail.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
scripts/faddr2line