Perf + Opencsd (aarch64) Off Target Trace Decoding shows "could not read first record/send request"
Pandey, Radhey Shyam
radhey.shyam.pandey at amd.com
Thu Jul 13 23:20:48 PDT 2023
> -----Original Message-----
> From: Pandey, Radhey Shyam
> Sent: Friday, July 14, 2023 11:28 AM
> To: James Clark <james.clark at arm.com>
> Cc: coresight at lists.linaro.org; linux-arm-kernel at lists.infradead.org; Sarangi,
> Anirudha <anirudha.sarangi at amd.com>; mathieu.poirier at linaro.org;
> mike.leach at linaro.org; leo.yan at linaro.org;
> alexander.shishkin at linux.intel.com; Suzuki K Poulose
> <suzuki.poulose at arm.com>
> Subject: RE: Perf + Opencsd (aarch64) Off Target Trace Decoding shows
> "could not read first record/send request"
>
> > -----Original Message-----
> > From: James Clark <james.clark at arm.com>
> > Sent: Tuesday, July 11, 2023 10:04 PM
> > To: Pandey, Radhey Shyam <radhey.shyam.pandey at amd.com>
> > Cc: coresight at lists.linaro.org; linux-arm-kernel at lists.infradead.org;
> Sarangi,
> > Anirudha <anirudha.sarangi at amd.com>; mathieu.poirier at linaro.org;
> > mike.leach at linaro.org; leo.yan at linaro.org;
> > alexander.shishkin at linux.intel.com; Suzuki K Poulose
> > <suzuki.poulose at arm.com>
> > Subject: Re: Perf + Opencsd (aarch64) Off Target Trace Decoding shows
> > "could not read first record/send request"
> >
> >
> >
> > On 11/07/2023 11:40, Suzuki K Poulose wrote:
> > > On 11/07/2023 10:26, Pandey, Radhey Shyam wrote:
> > >> Hi all,
> > >>
> > >> I am trying off Target Trace Decoding using arm-cs-trace-disasm.py
> > >> but it doesn’t show
> > >>
> > >> proper disassembly. There is unexpected warning "could not read first
> > >> record".
> > >
> > >
> > >>
> > >> Any pointers on what the issue could be?
> > >>
> > >> Meanwhile I am trying to do trace decoding on aarch64 target and see
> > >> if that helps.
> > >>
> > >> I have taken simple example mentioned in [1].
> > >>
> > >> [1]:
> > >> http://events17.linuxfoundation.org/sites/events/files/slides/ELC-E16
> > >> .pdf
> > >> <http://events17.linuxfoundation.org/sites/events/files/slides/ELC-E1
> > >> 6.pdf>
> > >>
> > >> #include int coresight_test1(int val);
> > >>
> > >> int main(void) {
> > >>
> > >> int val; val = coresight_test1(10);
> > >>
> > >> printf("val: %d\n", val);
> > >>
> > >> return 0;
> > >>
> > >> }
> > >>
> > >> perf record -e cs_etm/@tmc_etf0/u --filter
> > >> 'filter0x5a8/0x5e4@/home/root/libcstest.so.1.0' --per-thread ./main
> > >>
> > >> tar czf cs_example.tgz perf.data ~/.debug
> > >>
> > >> Off Target Trace Decoding: “perf report”
> > >>
> > >> tar xf cs_example.tgz
> > >>
> > >> $ rm -rf ~/.debug // remove previous trace data
> > >>
> > >> $ cp -dpR .debug ~/ // copy the current trace data
> > >>
> > >> $ perf report --stdio
> > >>
> > >> linux-xlnx/tools/perf/perf --exec-path= <snip>/linux-xlnx/tools/perf
> > >> script tools/perf/scripts/python/arm-cs-trace-disasm.py -- -d
> > >> ${XTOOL_PATH}/aarch64-linux-gnu-objdump -v
> > >>
> > >
> > > I believe the perf script doesn't work with coresight trace decoding
> > > as we need a two pass approach for decoding the stream for figuring
> > > out the parameters for the queues. James Clark can give you the exact
> > reason.
> > >
> > > Suzuki
> >
> > No that script is still working, I just tried it on and off target and it's all fine.
> >
> > I didn't use --exec-path=, I'm not sure why that's in that linked pdf, but it
> > didn't cause the same issue that you see if I added it.
> >
> > The "could not read first record" errors actually come from the addr2line
> > part of Perf rather than this script. Do you have perf report/annotate
> > working without the script?
>
> I tried perf capture and report on aarch64 target platform (To avoid any
> possible
> cross-platform issue) With that perf report seems working but perf annotate
> is
> not working. Any suggestions on what could be the issue?
>
> Copied perf report , annotate and script o/p logs below.
>
> Cross-compilation steps:
> aarch64-linux-gnu-gcc -shared -g libcstest.c -o libcstest.so.1.0
> aarch64-linux-gnu-gcc -g main.c -L. -l:libcstest.so.1.0 -o main
> Copied it to host.
>
> On Target:
>
> perf record -e cs_etm/@tmc_etf0/u --filter 'filter
> 0x5a8/0x5e4@/home/root/libcstest.so.1.0' --per-thread ./main
> val: 20
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.002 MB perf.data ]
>
> xilinx-vck190-20231:~# perf report -D 2>&1 | tee
> Warning:
> Please install libunwind or libdw development packages during the perf
> build.
> # To display the perf.data header info, please use --header/--header-only
> options.
> #
>
> 0x198 at perf.data [0x38]: event: 79
> .
> . ... raw event: size 56 bytes
> . 0000: 4f 00 00 00 00 00 38 00 15 00 00 00 00 00 00 00 O.....8.........
> . 0010: 00 00 40 01 00 00 00 00 46 ab c4 36 cd ff ff ff .. at .....F..6....
> . 0020: 02 20 33 14 05 00 00 00 ff ff ff ff ff ff ff 01 . 3.............
> . 0030: 01 01 00 00 00 00 00 00 ........
>
> 0x198 [0x38]: PERF_RECORD_TIME_CONV
> ... Time Shift 21
> ... Time Muliplier 20971520
> ... Time Zero 18446743855585078086
> ... Time Cycles 21813731330
> ... Time Mask 0x1ffffffffffffff
> ... Cap Time Zero 1
> ... Cap Time Short 1
> : unhandled!
>
> 0x1d0 at perf.data [0x50]: event: 69
> .
> . ... raw event: size 80 bytes
> . 0000: 45 00 00 00 00 00 50 00 02 00 00 00 00 00 00 00 E.....P.........
> . 0010: 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0020: ff ff ff ff ff ff ff ff 46 03 00 00 00 00 00 00 ........F.......
> . 0030: 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0040: ff ff ff ff ff ff ff ff 46 03 00 00 00 00 00 00 ........F.......
>
> 0x1d0 [0x50]: PERF_RECORD_ID_INDEX nr: 2
> ... id: 26 idx: 0 cpu: -1 tid: 838
> ... id: 27 idx: 0 cpu: -1 tid: 838
>
> 0x220 at perf.data [0xc8]: event: 70
> .
> . ... raw event: size 200 bytes
> . 0000: 46 00 00 00 00 00 c8 00 03 00 00 00 00 00 00 00 F...............
> . 0010: 01 00 00 00 00 00 00 00 02 00 00 00 08 00 00 00 ................
> . 0020: 00 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40
> ........@@@@@@@@
> . 0030: 00 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 ................
> . 0040: 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 ................
> . 0050: a1 0e 00 28 00 00 00 00 01 f4 00 41 00 00 00 00 ...(.......A....
> . 0060: 88 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0070: cc 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40
> ........@@@@@@@@
> . 0080: 01 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 ................
> . 0090: 00 00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 ................
> . 00a0: a1 0e 00 28 00 00 00 00 01 f4 00 41 00 00 00 00 ...(.......A....
> . 00b0: 88 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 00c0: cc 00 00 00 00 00 00 00 ........
>
> 0x220 [0xc8]: PERF_RECORD_AUXTRACE_INFO type: 3
> Header version 1
> PMU type/num cpus 800000002
> Snapshot 0
> Magic number 4040404040404040
> CPU 0
> NR_TRC_PARAMS 7
> TRCCONFIGR 0
> TRCTRACEIDR 10
> TRCIDR0 28000ea1
> TRCIDR1 4100f401
> TRCIDR2 488
> TRCIDR8 0
> TRCAUTHSTATUS cc
> Magic number 4040404040404040
> CPU 1
> NR_TRC_PARAMS 7
> TRCCONFIGR 0
> TRCTRACEIDR 12
> TRCIDR0 28000ea1
> TRCIDR1 4100f401
> TRCIDR2 488
> TRCIDR8 0
> TRCAUTHSTATUS cc
>
> 0@(null) [0x90]: event: 64
> .
> . ... raw event: size 144 bytes
> . 0000: 40 00 00 00 00 00 90 00 00 00 00 00 80 00 00 00 @...............
> . 0010: 04 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
> . 0020: 0b 01 01 00 00 00 00 00 14 00 00 00 00 00 00 00 ................
> . 0030: 60 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 `...............
> . 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0080: 00 00 00 00 00 00 00 00 1a ca 9a 3b 00 00 00 00 ...........;....
>
> 0 [0x90]: PERF_RECORD_ATTR
> 0@(null) [0x90]: event: 64
> .
> . ... raw event: size 144 bytes
> . 0000: 40 00 00 00 00 00 90 00 00 00 00 00 80 00 00 00 @...............
> . 0010: 01 00 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................
> . 0020: 03 01 01 00 00 00 00 00 14 00 00 00 00 00 00 00 ................
> . 0030: 60 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 `...............
> . 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0080: 00 00 00 00 00 00 00 00 1b ca 9a 3b 00 00 00 00 ...........;....
>
> 0 [0x90]: PERF_RECORD_ATTR
> 0x2e8 at perf.data [0x28]: event: 73
> .
> . ... raw event: size 40 bytes
> . 0000: 49 00 00 00 00 00 28 00 01 00 00 00 00 00 00 00 I.....(.........
> . 0010: 46 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F...............
> . 0020: 00 00 00 00 00 00 00 00 ........
>
> 0x2e8 [0x28]: PERF_RECORD_THREAD_MAP nr: 1 thread: 838
> : unhandled!
>
> 0x310 at perf.data [0x10]: event: 74
> .
> . ... raw event: size 16 bytes
> . 0000: 4a 00 00 00 00 00 10 00 00 00 01 00 ff ff 00 00 J...............
>
> 0x310 [0x10]: PERF_RECORD_CPU_MAP: -1
> : unhandled!
>
> 0x320 at perf.data [0x30]: event: 3
> .
> . ... raw event: size 48 bytes
> . 0000: 03 00 00 00 00 00 30 00 46 03 00 00 46 03 00 00 ......0.F...F...
> . 0010: 70 65 72 66 2d 65 78 65 63 00 00 00 00 00 00 00 perf-exec.......
> . 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>
> 0x320 [0x30]: PERF_RECORD_COMM: perf-exec:838/838
>
> 0x350 at perf.data [0x8]: event: 82
> .
> . ... raw event: size 8 bytes
> . 0000: 52 00 00 00 00 00 08 00 R.......
>
> 0x350 [0x8]: PERF_RECORD_FINISHED_INIT: unhandled!
>
> 0x358 at perf.data [0x20]: event: 12
> .
> . ... raw event: size 32 bytes
> . 0000: 0c 00 00 00 00 00 20 00 46 03 00 00 46 03 00 00 ...... .F...F...
> . 0010: 46 03 00 00 46 03 00 00 1a 00 00 00 00 00 00 00 F...F...........
>
> 0x358 [0x20]: PERF_RECORD_ITRACE_START pid: 838 tid: 838
>
> 0x378 at perf.data [0x30]: event: 11
> .
> . ... raw event: size 48 bytes
> . 0000: 0b 00 00 00 00 00 30 00 00 00 00 00 00 00 00 00 ......0.........
> . 0010: 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
> . 0020: 46 03 00 00 46 03 00 00 1a 00 00 00 00 00 00 00 F...F...........
>
> 0x378 [0x30]: PERF_RECORD_AUX offset: 0 size: 0x20 flags: 0 []
>
> 0x3a8 at perf.data [0x28]: event: 3
> .
> . ... raw event: size 40 bytes
> . 0000: 03 00 00 00 00 20 28 00 46 03 00 00 46 03 00 00 ..... (.F...F...
> . 0010: 6d 61 69 6e 00 00 00 00 46 03 00 00 46 03 00 00 main....F...F...
> . 0020: 1b 00 00 00 00 00 00 00 ........
>
> 0x3a8 [0x28]: PERF_RECORD_COMM exec: main:838/838
>
> 0x3d0 at perf.data [0x68]: event: 10
> .
> . ... raw event: size 104 bytes
> . 0000: 0a 00 00 00 02 00 68 00 46 03 00 00 46 03 00 00 ......h.F...F...
> . 0010: 00 00 f9 ba aa aa 00 00 00 10 02 00 00 00 00 00 ................
> . 0020: 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
> . 0030: a6 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .C..............
> . 0040: 05 00 00 00 02 00 00 00 2f 68 6f 6d 65 2f 72 6f ......../home/ro
> . 0050: 6f 74 2f 6d 61 69 6e 00 46 03 00 00 46 03 00 00 ot/main.F...F...
> . 0060: 1b 00 00 00 00 00 00 00 ........
>
> 0x3d0 [0x68]: PERF_RECORD_MMAP2 838/838: [0xaaaabaf90000(0x21000)
> @ 0 00:02 17318 0]: r-xp /home/root/main
>
> 0x438 at perf.data [0x78]: event: 10
> .
> . ... raw event: size 120 bytes
> . 0000: 0a 00 00 00 02 00 78 00 46 03 00 00 46 03 00 00 ......x.F...F...
> . 0010: 00 c0 e3 ae ff ff 00 00 00 20 04 00 00 00 00 00 ......... ......
> . 0020: 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
> . 0030: f1 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0040: 05 00 00 00 02 00 00 00 2f 6c 69 62 2f 6c 64 2d ......../lib/ld-
> . 0050: 6c 69 6e 75 78 2d 61 61 72 63 68 36 34 2e 73 6f linux-aarch64.so
> . 0060: 2e 31 00 00 00 00 00 00 46 03 00 00 46 03 00 00 .1......F...F...
> . 0070: 1b 00 00 00 00 00 00 00 ........
>
> 0x438 [0x78]: PERF_RECORD_MMAP2 838/838: [0xffffaee3c000(0x42000) @
> 0 00:02 1777 0]: r-xp /lib/ld-linux-aarch64.so.1
>
> 0x4b0 at perf.data [0x60]: event: 10
> .
> . ... raw event: size 96 bytes
> . 0000: 0a 00 00 00 02 00 60 00 46 03 00 00 46 03 00 00 ......`.F...F...
> . 0010: 00 90 e7 ae ff ff 00 00 00 10 00 00 00 00 00 00 ................
> . 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0040: 05 00 00 00 02 00 00 00 5b 76 64 73 6f 5d 00 00 ........[vdso]..
> . 0050: 46 03 00 00 46 03 00 00 1b 00 00 00 00 00 00 00 F...F...........
>
> 0x4b0 [0x60]: PERF_RECORD_MMAP2 838/838: [0xffffaee79000(0x1000) @ 0
> 00:00 0 0]: r-xp [vdso]
>
> 0x510 at perf.data [0x30]: event: 11
> .
> . ... raw event: size 48 bytes
> . 0000: 0b 00 00 00 00 00 30 00 20 00 00 00 00 00 00 00 ......0. .......
> . 0010: 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
> . 0020: 46 03 00 00 46 03 00 00 1a 00 00 00 00 00 00 00 F...F...........
>
> 0x510 [0x30]: PERF_RECORD_AUX offset: 0x20 size: 0x20 flags: 0 []
>
> 0x540 at perf.data [0x78]: event: 10
> .
> . ... raw event: size 120 bytes
> . 0000: 0a 00 00 00 02 00 78 00 46 03 00 00 46 03 00 00 ......x.F...F...
> . 0010: 00 00 e1 ae ff ff 00 00 00 10 02 00 00 00 00 00 ................
> . 0020: 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
> . 0030: a8 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .C..............
> . 0040: 05 00 00 00 02 00 00 00 2f 68 6f 6d 65 2f 72 6f ......../home/ro
> . 0050: 6f 74 2f 6c 69 62 63 73 74 65 73 74 2e 73 6f 2e ot/libcstest.so.
> . 0060: 31 2e 30 00 00 00 00 00 46 03 00 00 46 03 00 00 1.0.....F...F...
> . 0070: 1b 00 00 00 00 00 00 00 ........
>
> 0x540 [0x78]: PERF_RECORD_MMAP2 838/838: [0xffffaee10000(0x21000) @
> 0 00:02 17320 0]: r-xp /home/root/libcstest.so.1.0
>
> 0x5b8 at perf.data [0x68]: event: 10
> .
> . ... raw event: size 104 bytes
> . 0000: 0a 00 00 00 02 00 68 00 46 03 00 00 46 03 00 00 ......h.F...F...
> . 0010: 00 00 c6 ae ff ff 00 00 00 f0 1a 00 00 00 00 00 ................
> . 0020: 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
> . 0030: ff 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> . 0040: 05 00 00 00 02 00 00 00 2f 6c 69 62 2f 6c 69 62 ......../lib/lib
> . 0050: 63 2e 73 6f 2e 36 00 00 46 03 00 00 46 03 00 00 c.so.6..F...F...
> . 0060: 1b 00 00 00 00 00 00 00 ........
>
> 0x5b8 [0x68]: PERF_RECORD_MMAP2 838/838: [0xffffaec60000(0x1af000) @
> 0 00:02 1791 0]: r-xp /lib/libc.so.6
>
> 0x620 at perf.data [0x30]: event: 11
> .
> . ... raw event: size 48 bytes
> . 0000: 0b 00 00 00 00 00 30 00 40 00 00 00 00 00 00 00 ......0. at .......
> . 0010: 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 P...............
> . 0020: 46 03 00 00 46 03 00 00 1a 00 00 00 00 00 00 00 F...F...........
>
> 0x620 [0x30]: PERF_RECORD_AUX offset: 0x40 size: 0x50 flags: 0 []
>
> 0x650 at perf.data [0x30]: event: 4
> .
> . ... raw event: size 48 bytes
> . 0000: 04 00 00 00 00 00 30 00 46 03 00 00 45 03 00 00 ......0.F...E...
> . 0010: 46 03 00 00 45 03 00 00 66 a0 a1 b2 5b 03 00 00 F...E...f...[...
> . 0020: 46 03 00 00 46 03 00 00 1b 00 00 00 00 00 00 00 F...F...........
>
> 0x650 [0x30]: PERF_RECORD_EXIT(838:838):(837:837)
>
> 0x680 at perf.data [0x30]: event: 71
> .
> . ... raw event: size 48 bytes
> . 0000: 47 00 00 00 00 00 30 00 90 00 00 00 00 00 00 00 G.....0.........
> . 0010: 00 00 00 00 00 00 00 00 c5 4c 5e 73 59 08 d6 7b .........L^sY..{
> . 0020: 00 00 00 00 46 03 00 00 ff ff ff ff 00 00 00 00 ....F...........
>
> 0x680 [0x30]: PERF_RECORD_AUXTRACE size: 0x90 offset: 0 ref:
> 0x7bd60859735e4cc5 idx: 0 tid: 838 cpu: -1
>
> . ... CoreSight ETMV4I Trace data: size 0x20 bytes
> Idx:0; ID:12; I_ASYNC : Alignment Synchronisation.
> Idx:12; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 }
>
> . ... CoreSight ETMV4I Trace data: size 0x20 bytes
> Idx:32; ID:12; I_ASYNC : Alignment Synchronisation.
> Idx:44; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 }
>
> . ... CoreSight ETMV4I Trace data: size 0x50 bytes
> Idx:64; ID:12; I_ASYNC : Alignment Synchronisation.
> Idx:76; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 }
> Idx:81; ID:12; I_TRACE_ON : Trace On.
> Idx:82; ID:12; I_ADDR_CTXT_L_64IS0 : Address & Context, Long, 64
> bit, IS0.; Addr=0x0000FFFFAEE105A8; Ctxt: AArch64,EL0, NS;
> Idx:92; ID:12; I_ATOM_F6 : Atom format 6.; EEEEEEN
> Idx:93; ID:12; I_ATOM_F1 : Atom format 1.; E
> Idx:94; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.;
> Addr=0x0000AAAABAF907E8;
> Idx:104; ID:12; I_TRACE_ON : Trace On.
> Idx:105; ID:12; I_ADDR_CTXT_L_64IS0 : Address & Context, Long, 64
> bit, IS0.; Addr=0x0000FFFFAEE105E8; Ctxt: AArch64,EL0, NS;
> Idx:116; ID:12; I_ATOM_F1 : Atom format 1.; E
> Idx:117; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.;
> Addr=0x0000FFFFAEE404E4;
>
> 0x740 at perf.data [0x8]: event: 68
> .
> . ... raw event: size 8 bytes
> . 0000: 44 00 00 00 00 00 08 00 D.......
>
> 0x740 [0x8]: PERF_RECORD_FINISHED_ROUND
>
> Aggregated stats: (excludes AUX area (e.g. instruction trace) decoded /
> synthesized events)
> TOTAL events: 22
> COMM events: 2 ( 9.1%)
> EXIT events: 1 ( 4.5%)
> MMAP2 events: 5 (22.7%)
> AUX events: 3 (13.6%)
> ITRACE_START events: 1 ( 4.5%)
> ATTR events: 2 ( 9.1%)
> FINISHED_ROUND events: 1 ( 4.5%)
> ID_INDEX events: 1 ( 4.5%)
> AUXTRACE_INFO events: 1 ( 4.5%)
> AUXTRACE events: 1 ( 4.5%)
> THREAD_MAP events: 1 ( 4.5%)
> CPU_MAP events: 1 ( 4.5%)
> TIME_CONV events: 1 ( 4.5%)
> FINISHED_INIT events: 1 ( 4.5%)
>
>
> perf annotate -v 2>&1 | tee
> build id event received for [kernel.kallsyms]:
> 992c7046fc25c1546a5d8964379f9e2b8a969515 [20]
> build id event received for /home/root/main:
> 70180e5f45591089669808f03ecf6c82d526ec86 [20]
> build id event received for [vdso]:
> eb5fc38014e87cf51cc0897695f4d46bb153f346 [20]
> build id event received for /home/root/libcstest.so.1.0:
> a6a6d7ec171f451670e7a8a08d422d2227588ac3 [20]
>
>
> perf script -v 2>&1 | tee
> build id event received for [kernel.kallsyms]:
> 992c7046fc25c1546a5d8964379f9e2b8a969515 [20]
> build id event received for /home/root/main:
> 70180e5f45591089669808f03ecf6c82d526ec86 [20]
> build id event received for [vdso]:
> eb5fc38014e87cf51cc0897695f4d46bb153f346 [20]
> build id event received for /home/root/libcstest.so.1.0:
> a6a6d7ec171f451670e7a8a08d422d2227588ac3 [20]
> Samples for 'cs_etm/@tmc_etf0/u' event do not have TIME attribute set.
> Skipping 'time' field.
> Samples for 'cs_etm/@tmc_etf0/u' event do not have CPU attribute set.
> Skipping 'cpu' field.
> Samples for 'branches:uH' event do not have TIME attribute set. Skipping
> 'time' field.
> Samples for 'branches:uH' event do not have CPU attribute set. Skipping 'cpu'
> field.
> main 838 1 branches:uH: 0 [unknown] ([unknown])
> => ffffaee105a8 [unknown] (/home/root/libcstest.so.1.0)
> main 838 1 branches:uH: ffffaee105b4 [unknown]
> (/home/root/libcstest.so.1.0) => ffffaee105d0 [unknown]
> (/home/root/libcstest.so.1.0)
> main 838 1 branches:uH: ffffaee105d8 [unknown]
> (/home/root/libcstest.so.1.0) => ffffaee105b8 [unknown]
> (/home/root/libcstest.so.1.0)
> main 838 1 branches:uH: ffffaee105d8 [unknown]
> (/home/root/libcstest.so.1.0) => ffffaee105b8 [unknown]
> (/home/root/libcstest.so.1.0)
> main 838 1 branches:uH: ffffaee105d8 [unknown]
> (/home/root/libcstest.so.1.0) => ffffaee105b8 [unknown]
> (/home/root/libcstest.so.1.0)
> main 838 1 branches:uH: ffffaee105d8 [unknown]
> (/home/root/libcstest.so.1.0) => ffffaee105b8 [unknown]
> (/home/root/libcstest.so.1.0)
> main 838 1 branches:uH: ffffaee105d8 [unknown]
> (/home/root/libcstest.so.1.0) => ffffaee105b8 [unknown]
> (/home/root/libcstest.so.1.0)
> main 838 1 branches:uH: ffffaee105e4 [unknown]
> (/home/root/libcstest.so.1.0) => 0 [unknown] ([unknown])
> main 838 1 branches:uH: 0 [unknown] ([unknown])
> => ffffaee105e8 [unknown] (/home/root/libcstest.so.1.0)
>
>
> Thanks,
> Radhey
>
> >
> > Or does something like this work:
> >
> > $ echo "12345" | addr2line -e \
> > ~/.debug/.build-
> > id/b7/b30ba2c0f618615a8d32d86813718bb2fdb567/debug
> >
> > fpioconst.c:?
On X86_64:
echo "12345" | aarch64-linux-gnu-addr2line -e ~/.debug/home/root/main/70180e5f45591089669808f03ecf6c82d526ec86/elf
??:0
On aarch64 target.
echo "12345" | addr2line -e main
??:0
> >
> > I also just set the path to objdump directly rather than with a variable, but I
> > assume XTOOL_PATH is set? Although I think it must be because you get a
> > different error if objdump is missing.
> >
> > -d /usr/bin/aarch64-linux-gnu-objdump
> >
> > James
> >
> > >
> > >
> > >
> > >
> > >> ARM CoreSight Trace Data Assembler Dump
> > >>
> > >> addr2line /home/root/libcstest.so.1.0: could not read first record
> > >>
> > >> main 748/748 [0000] 0.000000000
> > >> ffffad8c05d8 /home/root/libcstest.so.1.0
> > >>
> > >> addr2line /home/root/libcstest.so.1.0: could not send request
> > >>
> > >> main 748/748 [0000] 0.000000000
> > >> ffffad8c05d8
> > >>
> > >> addr2line /home/root/libcstest.so.1.0: could not send request
> > >>
> > >> main 748/748 [0000] 0.000000000
> > >> ffffad8c05d8
> > >>
> > >> addr2line /home/root/libcstest.so.1.0: could not send request
> > >>
> > >> main 748/748 [0000] 0.000000000
> > >> ffffad8c05d8
> > >>
> > >> addr2line /home/root/libcstest.so.1.0: could not send request
> > >>
> > >> main 748/748 [0000] 0.000000000
> > >> ffffad8c05d8
> > >>
> > >> addr2line /home/root/libcstest.so.1.0: could not send request
> > >>
> > >> main 748/748 [0000] 0.000000000
> > >> ffffad8c05e4
> > >>
> > >> End
> > >>
> > >> tools/perf/perf report -D
> > >>
> > >> <snip>
> > >>
> > >> 0x680 [0x30]: PERF_RECORD_AUXTRACE size: 0x90 offset: 0 ref:
> > >> 0x2890bdbd7cad6b6f idx: 0 tid: 748 cpu: -1
> > >>
> > >> . ... CoreSight ETMV4I Trace data: size 0x20 bytes
> > >>
> > >> Idx:0; ID:10; I_ASYNC : Alignment Synchronisation.
> > >>
> > >> Idx:12; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0
> > >> }
> > >>
> > >> . ... CoreSight ETMV4I Trace data: size 0x20 bytes
> > >>
> > >> Idx:32; ID:10; I_ASYNC : Alignment Synchronisation.
> > >>
> > >> Idx:44; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0
> > >> }
> > >>
> > >> . ... CoreSight ETMV4I Trace data: size 0x50 bytes
> > >>
> > >> Idx:64; ID:10; I_ASYNC : Alignment Synchronisation.
> > >>
> > >> Idx:76; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0
> > >> }
> > >>
> > >> Idx:81; ID:10; I_TRACE_ON : Trace On.
> > >>
> > >> Idx:82; ID:10; I_ADDR_CTXT_L_64IS0 : Address & Context,
> > >> Long, 64 bit, IS0.; Addr=0x0000FFFFAD8C05A8; Ctxt: AArch64,EL0, NS;
> > >>
> > >> Idx:92; ID:10; I_ATOM_F6 : Atom format 6.; EEEEEEN
> > >>
> > >> Idx:93; ID:10; I_ATOM_F1 : Atom format 1.; E
> > >>
> > >> Idx:94; ID:10; I_ADDR_L_64IS0 : Address, Long, 64 bit,
> > >> IS0.; Addr=0x0000AAAAAC9107E8;
> > >>
> > >> Idx:104; ID:10; I_TRACE_ON : Trace On.
> > >>
> > >> Idx:105; ID:10; I_ADDR_CTXT_L_64IS0 : Address & Context,
> > >> Long, 64 bit, IS0.; Addr=0x0000FFFFAD8C05E8; Ctxt: AArch64,EL0, NS;
> > >>
> > >> Idx:116; ID:10; I_ATOM_F1 : Atom format 1.; E
> > >>
> > >> Idx:117; ID:10; I_ADDR_L_64IS0 : Address, Long, 64 bit,
> > >> IS0.; Addr=0x0000FFFFAD8EB4E4;
> > >>
> > >> 0x740 at perf.data <mailto:0x740 at perf.data> [0x8]: event: 68
> > >>
> > >> .
> > >>
> > >> . ... raw event: size 8 bytes
> > >>
> > >> . 0000: 44 00 00 00 00 00 08 00 D.......
> > >>
> > >> 0x740 [0x8]: PERF_RECORD_FINISHED_ROUND
> > >>
> > >> Aggregated stats: (excludes AUX area (e.g. instruction trace) decoded
> > >> / synthesized events)
> > >>
> > >> Thanks,
> > >>
> > >> Radhey
> > >>
> > >
> > > _______________________________________________
> > > CoreSight mailing list -- coresight at lists.linaro.org To unsubscribe
> > > send an email to coresight-leave at lists.linaro.org
More information about the linux-arm-kernel
mailing list