Support for perf 4.17 reports
man9ourah opened this issue · 3 comments
Does the lib along with the ptxed support decoding perf.data generated from perf version 4.17? I can see the script/perf-read-*.bash scripts generate incorrect information. I tried fixing it; I adjusted the perf-read-aux.bash to read the correct fields in the new perf script -D, but I am not sure if the library will be able to decode?
Thanks
Mansour.
It should work; let me know if it doesn't. You'd need to add 2 to every field index in script/perf-read-aux.bash. I will push a small patch to handle those small format differences in the next days.
Mansour replied via email:
Thanks Markus for your prompt fix, I really appreciate it ..
It seems though that there is still an issue with the sideband decoding, either from extracting it (using script/perf-read-sideband.bash) or from decoding it?
Here is my test run:
$ perf record -e intel_pt//u -T --switch-events -- ./test [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 4.004 MB perf.data ]
$ ~/processor-trace/script/perf-read-aux.bash
$ ~/processor-trace/script/perf-read-sideband.bash
I noticed two sideband files were generated and one aux trace file:
$ ls perf.data perf.data-sideband-cpu0.pevent test perf.data-aux-idx1.bin perf.data-sideband-cpu1.pevent test.c
Trying to decode with either sidebands using ptxed gives:
$ ~/processor-trace/script/perf-get-opts.bash -m perf.data-sideband-cpu1.pevent --cpu 6/122/1 --pevent:time-shift 31 --pevent:time-mult 1075462564 --pevent:time-zero 18446744057358654224 --cpuid-0x15.ebx 312 --cpuid-0x15.eax 3 --nom-freq 20 --pevent:sample-type 0x10086 --mtc-freq 0x3 --pevent:secondary perf.data-sideband-cpu0.pevent --pevent:primary perf.data-sideband-cpu1.pevent
$ ptxed --pevent:vdso-x64 /home/mansour/dump_vdso/vdso --cpu 6/122/1 --pevent:time-shift 31 --pevent:time-mult 1075462564 --pevent:time-zero 18446744057358654224 --cpuid-0x15.ebx 312 --cpuid-0x15.eax 3 --nom-freq 20 --pevent:sample-type 0x10086 --mtc-freq 0x3 --pevent:secondary perf.data-sideband-cpu0.pevent --pevent:primary perf.data-sideband-cpu1.pevent --pt perf.data-aux-idx1.bin | head [cbr: a] [perf.data-sideband-cpu1.pevent:00000000000001e0 sideband error: bad configuration] [enabled] [exec mode: 64-bit] [disabled] [resumed] 00007f12ef3ffc30 mov rdi, rsp 00007f12ef3ffc33 call 0x7f12ef4009b0 [disabled] [resumed]
You can try to use the --sb option to print sideband records interleaved with instrucitons (p
txed) or trace packets (ptdump). You can specify what is printed using --sb:* options.
From the error message you may need to sample the PID or tweak your perf_event_paranoid settings to get PERF_RECORD_SWITCH_CPU_WIDE events. Re-running with --sb --sb:filename should clarify that.
For a closer look at what's wrong I'd need your trace and all the traced binaries.
Thanks Markus,
I found out what was the problem..
I did not compile with the cmake var FEATURE_ELF = ON .. so context->abi was always set to unknown as the function elf_get_abi() is not compiled, and that caused vdso to be NULL hence the bad configuration error..
I recompiled with FEATURE_ELF=ON and everything is good...
Thanks again..