* why is 'perf record --call-graph' using addr2line? @ 2026-02-09 19:24 Noel Grandin 2026-02-09 19:39 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 5+ messages in thread From: Noel Grandin @ 2026-02-09 19:24 UTC (permalink / raw) To: linux-perf-use. Hi I am running $ perf record --call-graph=dwarf,32000 my_program.bin quite a lot. Until a couple of days ago, I would do this, hit ctrl-C, it would finish writing stuff to disk in a few seconds, and then I would proceed with using KDAB hotspot to analyse the data. Then I did a routine 'apt update' of my ubuntu box, and now.... Now, it takes 30+ minutes before perf exits, and it is spending all of that time running addr2line. Any ideas? Thanks, Noel Grandin ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: why is 'perf record --call-graph' using addr2line? 2026-02-09 19:24 why is 'perf record --call-graph' using addr2line? Noel Grandin @ 2026-02-09 19:39 ` Arnaldo Carvalho de Melo 2026-02-17 11:47 ` Noel Grandin 0 siblings, 1 reply; 5+ messages in thread From: Arnaldo Carvalho de Melo @ 2026-02-09 19:39 UTC (permalink / raw) To: Noel Grandin; +Cc: linux-perf-use. On Mon, Feb 09, 2026 at 09:24:47PM +0200, Noel Grandin wrote: > Hi > > I am running > > $ perf record --call-graph=dwarf,32000 my_program.bin > > quite a lot. > > Until a couple of days ago, I would do this, hit ctrl-C, it would > finish writing stuff to disk in a few seconds, and then I would > proceed with using KDAB hotspot to analyse the data. > > Then I did a routine 'apt update' of my ubuntu box, and now.... > Now, it takes 30+ minutes before perf exits, and it is spending all of > that time running addr2line. Are you sure? addr2line can be used when using '-s srcline' or '-s srcfile', but then in 'perf report', not on record. Doing some systemwide recording here I don't see such calls to addr2line, be it the function inside perf or the addr2line utility: root@number:/# perf probe -x ~/bin/perf addr2line Added new event: probe_perf:addr2line (on addr2line in /home/acme/bin/perf) You can now use it in all perf tools, such as: perf record -e probe_perf:addr2line -aR sleep 1 root@number:/# perf trace -e execve,probe_perf:addr2line perf record --call-graph=dwarf,32000 ? ( ): perf/1708890 ... [continued]: execve()) = 0 ^C[ perf record: Woken up 302 times to write data ] root@number:/# ls -[ perf record: Captured and wrote 89.499 MB perf.data (5420 samples) ] la perf.data -rw-------. 1 root root 93924024 Feb 9 16:37 perf.data root@number:/# ls -lah perf.data -rw-------. 1 root root 90M Feb 9 16:37 perf.data root@number:/# perf evlist -v cpu/cycles/P: type: 0 (PERF_TYPE_HARDWARE), size: 144, config: 0 (PERF_COUNT_HW_CPU_CYCLES), { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CALLCHAIN|CPU|PERIOD|REGS_USER|STACK_USER|IDENTIFIER, read_format: ID|LOST, disabled: 1, freq: 1, precise_ip: 2, sample_id_all: 1, exclude_callchain_user: 1, sample_regs_user: 0xff0fff, sample_stack_user: 32000 dummy:u: type: 1 (PERF_TYPE_SOFTWARE), size: 144, config: 0x9 (PERF_COUNT_SW_DUMMY), { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|IDENTIFIER, read_format: ID|LOST, exclude_kernel: 1, exclude_hv: 1, mmap: 1, comm: 1, task: 1, mmap_data: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1, build_id: 1 root@number:/# > Any ideas? Can you give more details? Do you have anything in ~/.perfconfig, etc? > Thanks, Noel Grandin ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: why is 'perf record --call-graph' using addr2line? 2026-02-09 19:39 ` Arnaldo Carvalho de Melo @ 2026-02-17 11:47 ` Noel Grandin 2026-02-18 2:05 ` Namhyung Kim 0 siblings, 1 reply; 5+ messages in thread From: Noel Grandin @ 2026-02-17 11:47 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: linux-perf-use. On Mon, 9 Feb 2026 at 21:39, Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > Are you sure? addr2line can be used when using '-s srcline' or '-s > srcfile', but then in 'perf report', not on record. > Yeah, that is what confused me too. I can see the addr2line sub-processes show up in ps. For example, if I do ps -ef, I see stuff like: noel 1259058 199773 10 13:45 pts/4 00:00:01 /usr/lib/linux-tools/6.17.0-14-generic/perf record --call-graph=dwarf,32000 --pid=1258658 noel 1259067 1259058 42 13:45 pts/4 00:00:01 addr2line -e /home/noel/.debug/.build-id/40/d2427b70abca4c5530fc6abe4b64acfe039146/elf -a -i -f noel 1259068 1259058 9 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/99/2e0e9c5b545f70d957da48ca4fa0062cc086c9/elf -a -i -f noel 1259069 1259058 2 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/71/9539027bc2d800b08810a3847206e283f8f347/elf -a -i -f noel 1259070 1259058 22 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/38/2eb792f7961162be41274fa3c1aae864f9cde7/elf -a -i -f noel 1259071 1259058 11 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/ed/fe3aec8836926683342a0efcb4d8e44eb8521a/elf -a -i -f noel 1259072 1259058 41 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/e8/fc08b1b0ce4130c26f40b13470d484fc2f6f55/elf -a -i -f noel 1259074 1259058 1 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/f4/8422093b1a8f666e0ef64ff6a3842d83206274/elf -a -i -f noel 1259075 1259058 2 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/55/43d41f3e8e476763d436e15d5a8e287d7ea677/elf -a -i -f noel 1259076 1259058 0 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/74/eaf539c3959f449ac8bd93ff882cd7b2990290/elf -a -i -f noel 1259077 1259058 5 13:45 pts/4 00:00:00 addr2line -e /home/noel/.debug/.build-id/8e/9fd827446c24067541ac5390e6f527fb5947bb/debug -a -i -f > Can you give more details? Do you have anything in ~/.perfconfig, etc? I do not have such a file. Note that in this case I am not doing system-wide profiling, just profiling a single process. Thanks, Noel Grandin ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: why is 'perf record --call-graph' using addr2line? 2026-02-17 11:47 ` Noel Grandin @ 2026-02-18 2:05 ` Namhyung Kim 2026-02-18 6:47 ` Noel Grandin 0 siblings, 1 reply; 5+ messages in thread From: Namhyung Kim @ 2026-02-18 2:05 UTC (permalink / raw) To: Noel Grandin; +Cc: Arnaldo Carvalho de Melo, linux-perf-use. Hello, On Tue, Feb 17, 2026 at 01:47:02PM +0200, Noel Grandin wrote: > On Mon, 9 Feb 2026 at 21:39, Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > Are you sure? addr2line can be used when using '-s srcline' or '-s > > srcfile', but then in 'perf report', not on record. > > > > Yeah, that is what confused me too. I can see the addr2line > sub-processes show up in ps. > > For example, if I do ps -ef, I see stuff like: > > noel 1259058 199773 10 13:45 pts/4 00:00:01 > /usr/lib/linux-tools/6.17.0-14-generic/perf record > --call-graph=dwarf,32000 --pid=1258658 > noel 1259067 1259058 42 13:45 pts/4 00:00:01 addr2line -e > /home/noel/.debug/.build-id/40/d2427b70abca4c5530fc6abe4b64acfe039146/elf > -a -i -f > noel 1259068 1259058 9 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/99/2e0e9c5b545f70d957da48ca4fa0062cc086c9/elf > -a -i -f > noel 1259069 1259058 2 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/71/9539027bc2d800b08810a3847206e283f8f347/elf > -a -i -f > noel 1259070 1259058 22 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/38/2eb792f7961162be41274fa3c1aae864f9cde7/elf > -a -i -f > noel 1259071 1259058 11 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/ed/fe3aec8836926683342a0efcb4d8e44eb8521a/elf > -a -i -f > noel 1259072 1259058 41 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/e8/fc08b1b0ce4130c26f40b13470d484fc2f6f55/elf > -a -i -f > noel 1259074 1259058 1 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/f4/8422093b1a8f666e0ef64ff6a3842d83206274/elf > -a -i -f > noel 1259075 1259058 2 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/55/43d41f3e8e476763d436e15d5a8e287d7ea677/elf > -a -i -f > noel 1259076 1259058 0 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/74/eaf539c3959f449ac8bd93ff882cd7b2990290/elf > -a -i -f > noel 1259077 1259058 5 13:45 pts/4 00:00:00 addr2line -e > /home/noel/.debug/.build-id/8e/9fd827446c24067541ac5390e6f527fb5947bb/debug > -a -i -f > > > Can you give more details? Do you have anything in ~/.perfconfig, etc? > > I do not have such a file. That's ok and it means you don't have any specific config. > > Note that in this case I am not doing system-wide profiling, just > profiling a single process. I think we turned on (since v6.17) the build-id collection on the callstacks (commit 29be60c93d2d9300) at the end of perf record. That may run addr2line to get inlined functions. There's a recent change to use libdw to speed up inline function processing. But it's gonna take some time to land on the distro. In the meantime, I think you can disable the build-ID entirely with -B option. Thanks, Namhyung ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: why is 'perf record --call-graph' using addr2line? 2026-02-18 2:05 ` Namhyung Kim @ 2026-02-18 6:47 ` Noel Grandin 0 siblings, 0 replies; 5+ messages in thread From: Noel Grandin @ 2026-02-18 6:47 UTC (permalink / raw) To: Namhyung Kim; +Cc: Arnaldo Carvalho de Melo, linux-perf-use. On Wed, 18 Feb 2026 at 04:05, Namhyung Kim <namhyung@kernel.org> wrote: > > In the meantime, I think you can disable the build-ID entirely with -B > option. > Aha! Thank you all very much, that indeed fixes my problem. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-18 6:48 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-02-09 19:24 why is 'perf record --call-graph' using addr2line? Noel Grandin 2026-02-09 19:39 ` Arnaldo Carvalho de Melo 2026-02-17 11:47 ` Noel Grandin 2026-02-18 2:05 ` Namhyung Kim 2026-02-18 6:47 ` Noel Grandin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox