Hi all,
I'd like to report a bug for toolchain related with arm64.
When I work on perf tool and found some kernel symbols are failed to be parsed based on kernel address.
This issue can be simplized with the command addr2line:
$ aarch64-none-linux-gnu-addr2line -e vmlinux ffff800010e11bb4 :? $ aarch64-none-linux-gnu-addr2line -e vmlinux ffff800010259700 :?
I tried two toolchains, one in on X86 and another is on Arm64 native, both have the same result. The toolchain versions are:
addr2line on Juno-r2 board:
root@debian:~/coresight_test# addr2line -v GNU addr2line (GNU Binutils for Debian) 2.31.1 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty.
addr2line on x86:
$ aarch64-none-linux-gnu-addr2line -v GNU addr2line (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209 Copyright (C) 2019 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty.
If use the objdump, these two addresses are belongs to the functions as below. The vmlinux has been uploaded into: http://people.linaro.org/~leo.yan/opencsd_juno/perf_decoder_analysis_2020021...
Sorry if this is not the right place to report this issue and appreciate to let me know the right way to report this.
ffff800010e11900 <_raw_spin_lock_irqsave>: ffff800010e11900: d503201f nop ffff800010e11904: d503201f nop ffff800010e11908: a9be7bfd stp x29, x30, [sp,#-32]! ffff800010e1190c: aa0003e3 mov x3, x0 ffff800010e11910: 910003fd mov x29, sp ffff800010e11914: f9000bf3 str x19, [sp,#16] ffff800010e11918: d53b4233 mrs x19, daif ffff800010e1191c: 12190260 and w0, w19, #0x80 ffff800010e11920: 34000340 cbz w0, ffff800010e11988 <_raw_spin_lock_irqsave+0x88> ffff800010e11924: d5384101 mrs x1, sp_el0 ffff800010e11928: b9401020 ldr w0, [x1,#16] ffff800010e1192c: 11000400 add w0, w0, #0x1 ffff800010e11930: b9001020 str w0, [x1,#16] ffff800010e11934: 1400000d b ffff800010e11968 <_raw_spin_lock_irqsave+0x68> ffff800010e11938: 1400000c b ffff800010e11968 <_raw_spin_lock_irqsave+0x68> ffff800010e1193c: 52800001 mov w1, #0x0 // #0 ffff800010e11940: aa0303e0 mov x0, x3 ffff800010e11944: 52800022 mov w2, #0x1 // #1 ffff800010e11948: 2a0103e4 mov w4, w1 ffff800010e1194c: 88e47c62 casa w4, w2, [x3] ffff800010e11950: 2a0403e0 mov w0, w4 ffff800010e11954: 35000120 cbnz w0, ffff800010e11978 <_raw_spin_lock_irqsave+0x78> ffff800010e11958: aa1303e0 mov x0, x19 ffff800010e1195c: f9400bf3 ldr x19, [sp,#16] ffff800010e11960: a8c27bfd ldp x29, x30, [sp],#32 ffff800010e11964: d65f03c0 ret ffff800010e11968: d2800001 mov x1, #0x0 // #0 ffff800010e1196c: 52800022 mov w2, #0x1 // #1 ffff800010e11970: 1400008b b ffff800010e11b9c <_raw_spin_lock_irqsave+0x29c> ffff800010e11974: 34ffff20 cbz w0, ffff800010e11958 <_raw_spin_lock_irqsave+0x58> ffff800010e11978: 2a0003e1 mov w1, w0 ffff800010e1197c: aa0303e0 mov x0, x3 ffff800010e11980: 97cd0524 bl ffff800010152e10 <queued_spin_lock_slowpath> ffff800010e11984: 17fffff5 b ffff800010e11958 <_raw_spin_lock_irqsave+0x58> ffff800010e11988: d2800c00 mov x0, #0x60 // #96 ffff800010e1198c: d50342df msr daifset, #0x2 ffff800010e11990: 17ffffe5 b ffff800010e11924 <_raw_spin_lock_irqsave+0x24> ffff800010e11994: f9800011 prfm pstl1strm, [x0] ffff800010e11998: 885f7c02 ldxr w2, [x0] ffff800010e1199c: 4b010042 sub w2, w2, w1 ffff800010e119a0: 8803fc02 stlxr w3, w2, [x0] ffff800010e119a4: 35ffffa3 cbnz w3, ffff800010e11998 <_raw_spin_lock_irqsave+0x98> ffff800010e119a8: 17fffd70 b ffff800010e10f68 <_raw_read_unlock+0x50> ffff800010e119ac: f9800071 prfm pstl1strm, [x3] ffff800010e119b0: 885ffc60 ldaxr w0, [x3] ffff800010e119b4: 4a010004 eor w4, w0, w1 ffff800010e119b8: 35000064 cbnz w4, ffff800010e119c4 <_raw_spin_lock_irqsave+0xc4> ffff800010e119bc: 88047c62 stxr w4, w2, [x3] ffff800010e119c0: 35ffff84 cbnz w4, ffff800010e119b0 <_raw_spin_lock_irqsave+0xb0> ffff800010e119c4: 17fffd90 b ffff800010e11004 <_raw_write_lock_irqsave+0x74> ffff800010e119c8: f9800011 prfm pstl1strm, [x0] ffff800010e119cc: 885f7c03 ldxr w3, [x0] ffff800010e119d0: 4b020063 sub w3, w3, w2 ffff800010e119d4: 8804fc03 stlxr w4, w3, [x0] ffff800010e119d8: 35ffffa4 cbnz w4, ffff800010e119cc <_raw_spin_lock_irqsave+0xcc> ffff800010e119dc: 17fffd9e b ffff800010e11054 <_raw_read_unlock_irqrestore+0x34> ffff800010e119e0: f9800071 prfm pstl1strm, [x3] ffff800010e119e4: 885ffc61 ldaxr w1, [x3] ffff800010e119e8: 4a000024 eor w4, w1, w0 ffff800010e119ec: 35000064 cbnz w4, ffff800010e119f8 <_raw_spin_lock_irqsave+0xf8> ffff800010e119f0: 88047c62 stxr w4, w2, [x3] ffff800010e119f4: 35ffff84 cbnz w4, ffff800010e119e4 <_raw_spin_lock_irqsave+0xe4> ffff800010e119f8: 17fffdc6 b ffff800010e11110 <_raw_spin_trylock+0x88> ffff800010e119fc: f9800011 prfm pstl1strm, [x0] ffff800010e11a00: 885ffc01 ldaxr w1, [x0] ffff800010e11a04: 11080021 add w1, w1, #0x200 ffff800010e11a08: 88027c01 stxr w2, w1, [x0] ffff800010e11a0c: 35ffffa2 cbnz w2, ffff800010e11a00 <_raw_spin_lock_irqsave+0x100> ffff800010e11a10: 17fffde9 b ffff800010e111b4 <_raw_read_trylock+0x84> ffff800010e11a14: f9800011 prfm pstl1strm, [x0] ffff800010e11a18: 885f7c02 ldxr w2, [x0] ffff800010e11a1c: 4b010042 sub w2, w2, w1 ffff800010e11a20: 88037c02 stxr w3, w2, [x0] ffff800010e11a24: 35ffffa3 cbnz w3, ffff800010e11a18 <_raw_spin_lock_irqsave+0x118> ffff800010e11a28: 17fffdef b ffff800010e111e4 <_raw_read_trylock+0xb4> ffff800010e11a2c: f9800071 prfm pstl1strm, [x3] ffff800010e11a30: 885ffc61 ldaxr w1, [x3] ffff800010e11a34: 4a000024 eor w4, w1, w0 ffff800010e11a38: 35000064 cbnz w4, ffff800010e11a44 <_raw_spin_lock_irqsave+0x144> ffff800010e11a3c: 88047c62 stxr w4, w2, [x3] ffff800010e11a40: 35ffff84 cbnz w4, ffff800010e11a30 <_raw_spin_lock_irqsave+0x130> ffff800010e11a44: 17fffe0b b ffff800010e11270 <_raw_write_trylock+0x88> ffff800010e11a48: f9800071 prfm pstl1strm, [x3] ffff800010e11a4c: 885ffc60 ldaxr w0, [x3] ffff800010e11a50: 4a010004 eor w4, w0, w1 ffff800010e11a54: 35000064 cbnz w4, ffff800010e11a60 <_raw_spin_lock_irqsave+0x160> ffff800010e11a58: 88047c62 stxr w4, w2, [x3] ffff800010e11a5c: 35ffff84 cbnz w4, ffff800010e11a4c <_raw_spin_lock_irqsave+0x14c> ffff800010e11a60: 17fffe2c b ffff800010e11310 <_raw_spin_trylock_bh+0x80> ffff800010e11a64: f9800011 prfm pstl1strm, [x0] ffff800010e11a68: 885f7c02 ldxr w2, [x0] ffff800010e11a6c: 4b010042 sub w2, w2, w1 ffff800010e11a70: 8803fc02 stlxr w3, w2, [x0] ffff800010e11a74: 35ffffa3 cbnz w3, ffff800010e11a68 <_raw_spin_lock_irqsave+0x168> ffff800010e11a78: 17fffe39 b ffff800010e1135c <_raw_read_unlock_bh+0x44> ffff800010e11a7c: f9800011 prfm pstl1strm, [x0] ffff800010e11a80: 885ffc01 ldaxr w1, [x0] ffff800010e11a84: 11080021 add w1, w1, #0x200 ffff800010e11a88: 88027c01 stxr w2, w1, [x0] ffff800010e11a8c: 35ffffa2 cbnz w2, ffff800010e11a80 <_raw_spin_lock_irqsave+0x180> ffff800010e11a90: 17fffe4a b ffff800010e113b8 <_raw_read_lock+0x48> ffff800010e11a94: f9800071 prfm pstl1strm, [x3] ffff800010e11a98: 885ffc60 ldaxr w0, [x3] ffff800010e11a9c: 4a010004 eor w4, w0, w1 ffff800010e11aa0: 35000064 cbnz w4, ffff800010e11aac <_raw_spin_lock_irqsave+0x1ac> ffff800010e11aa4: 88047c62 stxr w4, w2, [x3] ffff800010e11aa8: 35ffff84 cbnz w4, ffff800010e11a98 <_raw_spin_lock_irqsave+0x198> ffff800010e11aac: 17fffe5d b ffff800010e11420 <_raw_write_lock_bh+0x58> ffff800010e11ab0: f9800011 prfm pstl1strm, [x0] ffff800010e11ab4: 885ffc01 ldaxr w1, [x0] ffff800010e11ab8: 11080021 add w1, w1, #0x200 ffff800010e11abc: 88027c01 stxr w2, w1, [x0] ffff800010e11ac0: 35ffffa2 cbnz w2, ffff800010e11ab4 <_raw_spin_lock_irqsave+0x1b4> ffff800010e11ac4: 17fffe6d b ffff800010e11478 <_raw_read_lock_bh+0x48> ffff800010e11ac8: f9800071 prfm pstl1strm, [x3] ffff800010e11acc: 885ffc60 ldaxr w0, [x3] ffff800010e11ad0: 4a010004 eor w4, w0, w1 ffff800010e11ad4: 35000064 cbnz w4, ffff800010e11ae0 <_raw_spin_lock_irqsave+0x1e0> ffff800010e11ad8: 88047c62 stxr w4, w2, [x3] ffff800010e11adc: 35ffff84 cbnz w4, ffff800010e11acc <_raw_spin_lock_irqsave+0x1cc> ffff800010e11ae0: 17fffe80 b ffff800010e114e0 <_raw_write_lock+0x58> ffff800010e11ae4: f9800071 prfm pstl1strm, [x3] ffff800010e11ae8: 885ffc60 ldaxr w0, [x3] ffff800010e11aec: 4a010004 eor w4, w0, w1 ffff800010e11af0: 35000064 cbnz w4, ffff800010e11afc <_raw_spin_lock_irqsave+0x1fc> ffff800010e11af4: 88047c62 stxr w4, w2, [x3] ffff800010e11af8: 35ffff84 cbnz w4, ffff800010e11ae8 <_raw_spin_lock_irqsave+0x1e8> ffff800010e11afc: 17fffe93 b ffff800010e11548 <_raw_spin_lock_bh+0x58> ffff800010e11b00: f9800071 prfm pstl1strm, [x3] ffff800010e11b04: 885ffc60 ldaxr w0, [x3] ffff800010e11b08: 4a010004 eor w4, w0, w1 ffff800010e11b0c: 35000064 cbnz w4, ffff800010e11b18 <_raw_spin_lock_irqsave+0x218> ffff800010e11b10: 88047c62 stxr w4, w2, [x3] ffff800010e11b14: 35ffff84 cbnz w4, ffff800010e11b04 <_raw_spin_lock_irqsave+0x204> ffff800010e11b18: 17fffea8 b ffff800010e115b8 <_raw_spin_lock+0x58> ffff800010e11b1c: f9800011 prfm pstl1strm, [x0] ffff800010e11b20: 885f7c02 ldxr w2, [x0] ffff800010e11b24: 4b010042 sub w2, w2, w1 ffff800010e11b28: 8803fc02 stlxr w3, w2, [x0] ffff800010e11b2c: 35ffffa3 cbnz w3, ffff800010e11b20 <_raw_spin_lock_irqsave+0x220> ffff800010e11b30: 17fffef1 b ffff800010e116f4 <_raw_read_unlock_irq+0x34> ffff800010e11b34: f9800011 prfm pstl1strm, [x0] ffff800010e11b38: 885ffc01 ldaxr w1, [x0] ffff800010e11b3c: 11080021 add w1, w1, #0x200 ffff800010e11b40: 88027c01 stxr w2, w1, [x0] ffff800010e11b44: 35ffffa2 cbnz w2, ffff800010e11b38 <_raw_spin_lock_irqsave+0x238> ffff800010e11b48: 17ffff0e b ffff800010e11780 <_raw_read_lock_irq+0x50> ffff800010e11b4c: f9800071 prfm pstl1strm, [x3] ffff800010e11b50: 885ffc60 ldaxr w0, [x3] ffff800010e11b54: 4a010004 eor w4, w0, w1 ffff800010e11b58: 35000064 cbnz w4, ffff800010e11b64 <_raw_spin_lock_irqsave+0x264> ffff800010e11b5c: 88047c62 stxr w4, w2, [x3] ffff800010e11b60: 35ffff84 cbnz w4, ffff800010e11b50 <_raw_spin_lock_irqsave+0x250> ffff800010e11b64: 17ffff24 b ffff800010e117f4 <_raw_write_lock_irq+0x64> ffff800010e11b68: f9800071 prfm pstl1strm, [x3] ffff800010e11b6c: 885ffc60 ldaxr w0, [x3] ffff800010e11b70: 4a010004 eor w4, w0, w1 ffff800010e11b74: 35000064 cbnz w4, ffff800010e11b80 <_raw_spin_lock_irqsave+0x280> ffff800010e11b78: 88047c62 stxr w4, w2, [x3] ffff800010e11b7c: 35ffff84 cbnz w4, ffff800010e11b6c <_raw_spin_lock_irqsave+0x26c> ffff800010e11b80: 17ffff3b b ffff800010e1186c <_raw_spin_lock_irq+0x64> ffff800010e11b84: f9800011 prfm pstl1strm, [x0] ffff800010e11b88: 885ffc01 ldaxr w1, [x0] ffff800010e11b8c: 11080021 add w1, w1, #0x200 ffff800010e11b90: 88027c01 stxr w2, w1, [x0] ffff800010e11b94: 35ffffa2 cbnz w2, ffff800010e11b88 <_raw_spin_lock_irqsave+0x288> ffff800010e11b98: 17ffff50 b ffff800010e118d8 <_raw_read_lock_irqsave+0x58> ffff800010e11b9c: f9800071 prfm pstl1strm, [x3] ffff800010e11ba0: 885ffc60 ldaxr w0, [x3] ffff800010e11ba4: 4a010004 eor w4, w0, w1 ffff800010e11ba8: 35000064 cbnz w4, ffff800010e11bb4 <_raw_spin_lock_irqsave+0x2b4> ffff800010e11bac: 88047c62 stxr w4, w2, [x3] ffff800010e11bb0: 35ffff84 cbnz w4, ffff800010e11ba0 <_raw_spin_lock_irqsave+0x2a0> ffff800010e11bb4: 17ffff70 b ffff800010e11974 <_raw_spin_lock_irqsave+0x74>
ffff8000102591f0 <perf_event_exit_cpu>: ffff8000102591f0: a9bf7bfd stp x29, x30, [sp,#-16]! ffff8000102591f4: 910003fd mov x29, sp ffff8000102591f8: 97ffdbf4 bl ffff8000102501c8 <perf_event_exit_cpu_context> ffff8000102591fc: 52800000 mov w0, #0x0 // #0 ffff800010259200: a8c17bfd ldp x29, x30, [sp],#16 ffff800010259204: d65f03c0 ret ffff800010259208: f9800031 prfm pstl1strm, [x1] ffff80001025920c: c85f7c20 ldxr x0, [x1] ffff800010259210: b27b0000 orr x0, x0, #0x20 ffff800010259214: c8037c20 stxr w3, x0, [x1] ffff800010259218: 35ffffa3 cbnz w3, ffff80001025920c <perf_event_exit_cpu+0x1c> ffff80001025921c: 17ffc8b9 b ffff80001024b500 <set_fs+0x48> [SNIP] ffff8000102596e0: 17fff669 b ffff800010257084 <perf_prepare_sample+0x5b4> ffff8000102596e4: f9800091 prfm pstl1strm, [x4] ffff8000102596e8: c85f7c80 ldxr x0, [x4] ffff8000102596ec: ca030001 eor x1, x0, x3 ffff8000102596f0: b5000081 cbnz x1, ffff800010259700 <perf_event_exit_cpu+0x510> ffff8000102596f4: c801fc82 stlxr w1, x2, [x4] ffff8000102596f8: 35ffff81 cbnz w1, ffff8000102596e8 <perf_event_exit_cpu+0x4f8> ffff8000102596fc: d5033bbf dmb ish ffff800010259700: 17fffa30 b ffff800010257fc0 <perf_swevent_set_period+0x60> ffff800010259704: f98000d1 prfm pstl1strm, [x6]
Thanks, Leo