Good morning,
I am currently travelling and as such won't be able to get back to you before next week.
Regards, Mathieu
On 4 August 2017 at 07:38, yoma sophian sophian.yoma@gmail.com wrote:
hi Mathieu:
My first guess would be that variable CSTRACE_PATH wasn't defined when compiling the perf tools, and as such the functionality is not enabled. The HOWTO.md on gitHub explains how to do all that.
I did export CSTRACE_PATH while cross-compiling perf. But still get unsupported event message: "# ./perf record -e cs_etm/@f0106000.etf/ --per-thread uname invalid or unsupported event: 'cs_etm/@f0106000.etf/"
When finish cross-compiling perf, I purposely use arm-linux-gnueabihf-readelf and get dynamic section information as below: (Could we conclude that below "***" shows "CSTRACE_PATH" is set properly?)
====================================================== Dynamic section at offset 0x16c4c8 contains 33 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libpthread.so.0] 0x00000001 (NEEDED) Shared library: [librt.so.1] 0x00000001 (NEEDED) Shared library: [libm.so.6] 0x00000001 (NEEDED) Shared library: [libdl.so.2] 0x00000001 (NEEDED) Shared library: [libcstraced_c_api.so] --> *** 0x00000001 (NEEDED) Shared library: [libcstraced.so] --> *** 0x00000001 (NEEDED) Shared library: [libstdc++.so.6] 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3] 0x0000000c (INIT) 0x138e0 0x0000000d (FINI) 0x12d5ec 0x00000019 (INIT_ARRAY) 0x18c348 0x0000001b (INIT_ARRAYSZ) 8 (bytes) 0x0000001a (FINI_ARRAY) 0x18c350 =========================================================
I use below git commit version of perf and opencsd: a. perf-master: commit 27ecd6f2b547 ("coresight: etr: Add barrier packet for synchronisation") b. opencsd : commit 4f068b1c94db ("opencsd: Trace return stack debug messages off by default.")
And cross-compile command like below:
cd /media/sdb1/software/opencsd/my-opencsd/decoder/build/linux; make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean; make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- DEBUG=1 -j4; make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4; cd ../../../; cd /media/sdb1/software/opencsd/perf-opencsd-master; export CSTRACE_PATH=/media/sdb1/software/opencsd/my-opencsd/decoder make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C tools/perf/ clean -j4; make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C tools/perf/ DEBUG=1 V=1 -j4; =============================================================
Appreciate your kind help,