Dears,
I am beginner of using opencsd-perf to study the coresight. My testing platform is Qcom smart phone (SDM845).
I've successful build the opencsed lib and perf-opencsd (both are master branch) https://github.com/Linaro/OpenCSD https://github.com/Linaro/perf-opencsd
I can find some devices name like these, ( when executing `ls /sys/bus/coresight/devices/`) ..., coresight-stm, coresight-tmc-etf, coresight-tmc-etr, coresight-ssc-etm0, ...
However, when I using the commands, I got the error. 1. perfcsd record -e cs_etm/coresight-tmc-etf/ --per-thread ls ==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ unknown term 2. perfcsd record -e cs_etm/@coresight-tmc-etf/ --per-thread ls ==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ parser error
I've tried any solutions as many as possible, but I still cannot solve this problem. Does perf-opencsd support the android?
Can you help me?
Thank you very much.
Eric
On Tue, 9 Jun 2020 at 07:11, H MJ eric.mjh123@gmail.com wrote:
Dears,
I am beginner of using opencsd-perf to study the coresight. My testing platform is Qcom smart phone (SDM845).
I've successful build the opencsed lib and perf-opencsd (both are master branch) https://github.com/Linaro/OpenCSD https://github.com/Linaro/perf-opencsd
The perf-opencsd repository is obsolete and no longer supported. Please use the latest mainline kernel.
Thanks, Mathieu
I can find some devices name like these, ( when executing `ls /sys/bus/coresight/devices/`) ..., coresight-stm, coresight-tmc-etf, coresight-tmc-etr, coresight-ssc-etm0, ...
However, when I using the commands, I got the error.
- perfcsd record -e cs_etm/coresight-tmc-etf/ --per-thread ls
==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ unknown term 2. perfcsd record -e cs_etm/@coresight-tmc-etf/ --per-thread ls ==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ parser error
I've tried any solutions as many as possible, but I still cannot solve this problem. Does perf-opencsd support the android?
Can you help me?
Thank you very much.
Eric _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Dear Mathieu,
Big thanks for this replaying.
Did you mean directly use the folder 'tools/perf' in perf-opencsd to replace the folder 'tools/perf' in laste mainline kernel.
Big Thanks, BRs, Eric
Mathieu Poirier mathieu.poirier@linaro.org 於 2020年6月9日 週二 下午11:36寫道:
On Tue, 9 Jun 2020 at 07:11, H MJ eric.mjh123@gmail.com wrote:
Dears,
I am beginner of using opencsd-perf to study the coresight. My testing platform is Qcom smart phone (SDM845).
I've successful build the opencsed lib and perf-opencsd (both are
master branch)
https://github.com/Linaro/OpenCSD https://github.com/Linaro/perf-opencsd
The perf-opencsd repository is obsolete and no longer supported. Please use the latest mainline kernel.
Thanks, Mathieu
I can find some devices name like these, ( when executing `ls
/sys/bus/coresight/devices/`)
..., coresight-stm, coresight-tmc-etf, coresight-tmc-etr,
coresight-ssc-etm0, ...
However, when I using the commands, I got the error.
- perfcsd record -e cs_etm/coresight-tmc-etf/ --per-thread ls
==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ unknown term 2. perfcsd record -e cs_etm/@coresight-tmc-etf/ --per-thread ls ==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ parser error
I've tried any solutions as many as possible, but I still cannot solve
this problem.
Does perf-opencsd support the android?
Can you help me?
Thank you very much.
Eric _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Dear Mathieu,
Big thanks for this replaying.
Did you mean directly use the folder 'tools/perf' in perf-opencsd to replace the folder 'tools/perf' in laste mainline kernel?
Is it the same as directly using the 'tools/perf' in the last mainline kernel with the opencsd lib ? (I've tried, but failed. orz...)
Big Thanks, BRs, Eric
Mathieu Poirier mathieu.poirier@linaro.org 於 2020年6月9日 週二 下午11:36寫道:
On Tue, 9 Jun 2020 at 07:11, H MJ eric.mjh123@gmail.com wrote:
Dears,
I am beginner of using opencsd-perf to study the coresight. My testing platform is Qcom smart phone (SDM845).
I've successful build the opencsed lib and perf-opencsd (both are
master branch)
https://github.com/Linaro/OpenCSD https://github.com/Linaro/perf-opencsd
The perf-opencsd repository is obsolete and no longer supported. Please use the latest mainline kernel.
Thanks, Mathieu
I can find some devices name like these, ( when executing `ls
/sys/bus/coresight/devices/`)
..., coresight-stm, coresight-tmc-etf, coresight-tmc-etr,
coresight-ssc-etm0, ...
However, when I using the commands, I got the error.
- perfcsd record -e cs_etm/coresight-tmc-etf/ --per-thread ls
==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ unknown term 2. perfcsd record -e cs_etm/@coresight-tmc-etf/ --per-thread ls ==> event syntax error: 'cs_etm/coresight-tmc-etf/' ___ parser error
I've tried any solutions as many as possible, but I still cannot solve
this problem.
Does perf-opencsd support the android?
Can you help me?
Thank you very much.
Eric _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Hi,
On Wed, Jun 10, 2020 at 10:19:35AM +0800, H MJ wrote:
Dear Mathieu,
Big thanks for this replaying.
Did you mean directly use the folder 'tools/perf' in perf-opencsd to replace the folder 'tools/perf' in laste mainline kernel?
No, I think Mathieu suggested you to use the mainline kernel completely, for building both kernel and 'tools/perf'.
Is it the same as directly using the 'tools/perf' in the last mainline kernel with the opencsd lib ?
perf-opencsd is relative old and it might be incompatible with the mainline kernel (e.g. if you are using kernel image from perf-opencsd and using perf tool from mainline kernel, it's likely not work).
Thanks, Leo
Dear Leo,
Very thanks for your replaying.
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 上午11:15寫道:
Hi,
On Wed, Jun 10, 2020 at 10:19:35AM +0800, H MJ wrote:
Dear Mathieu,
Big thanks for this replaying.
Did you mean directly use the folder 'tools/perf' in perf-opencsd to replace the folder 'tools/perf' in laste mainline kernel?
No, I think Mathieu suggested you to use the mainline kernel completely, for building both kernel and 'tools/perf'.
Is it the same as directly using the 'tools/perf' in the last mainline kernel with the opencsd lib ?
perf-opencsd is relative old and it might be incompatible with the mainline kernel (e.g. if you are using kernel image from perf-opencsd and using perf tool from mainline kernel, it's likely not work).
I've tried directly compile the last mainline kernel and its perf, but its perf cannot fetch the cs_etm event. (coresight). After that, I additional included the opencsd lib (only opencsd lib, not perf-opencsd), but it happened "parser error" and "unknown term".
orz...
Thanks, Leo
Hi,
On Wed, Jun 10, 2020 at 11:46:39AM +0800, H MJ wrote:
Dear Leo,
Very thanks for your replaying.
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 上午11:15寫道:
Hi,
On Wed, Jun 10, 2020 at 10:19:35AM +0800, H MJ wrote:
Dear Mathieu,
Big thanks for this replaying.
Did you mean directly use the folder 'tools/perf' in perf-opencsd to replace the folder 'tools/perf' in laste mainline kernel?
No, I think Mathieu suggested you to use the mainline kernel completely, for building both kernel and 'tools/perf'.
Is it the same as directly using the 'tools/perf' in the last mainline kernel with the opencsd lib ?
perf-opencsd is relative old and it might be incompatible with the mainline kernel (e.g. if you are using kernel image from perf-opencsd and using perf tool from mainline kernel, it's likely not work).
I've tried directly compile the last mainline kernel and its perf, but its perf cannot fetch the cs_etm event. (coresight).
Could you give more detailed info (like commands and logs) so others can help you to analyze potential issue?
After that, I additional included the opencsd lib (only opencsd lib, not perf-opencsd), but it happened "parser error" and "unknown term".
Just remind, from my understanding, OpenCSD lib is relevant with CoreSight trace decoding, so even without linking OpenCSD lib for perf tool, it still can capture trace data with command:
perf record -e cs_etm/@tmc_etr0/u --per-thread program
So more detailed info might can be helpful.
Thanks, Leo
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error Run 'perf list' for a list of valid events
Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command> [<options>]
-e, --event <event> event selector. use 'perf list' to list available events
# ./perf_mi_1817 record -e cs_etm/coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/coresight-tmc-etr/' ___ unknown term
valid terms: timestamp,cycacc,config,config1,config2,name,period,freq,branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack,no-overwrite,overwrite,driver-config Run 'perf list' for a list of valid events
Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command> [<options>]
-e, --event <event> event selector. use 'perf list' to list available events
Could you give me some possible solutions? Thank you very much.
BRs. Eric. ===============================================================
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 下午12:51寫道:
Hi,
On Wed, Jun 10, 2020 at 11:46:39AM +0800, H MJ wrote:
Dear Leo,
Very thanks for your replaying.
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 上午11:15寫道:
Hi,
On Wed, Jun 10, 2020 at 10:19:35AM +0800, H MJ wrote:
Dear Mathieu,
Big thanks for this replaying.
Did you mean directly use the folder 'tools/perf' in perf-opencsd to replace the folder 'tools/perf' in laste mainline kernel?
No, I think Mathieu suggested you to use the mainline kernel completely, for building both kernel and 'tools/perf'.
Is it the same as directly using the 'tools/perf' in the last mainline kernel with the opencsd lib ?
perf-opencsd is relative old and it might be incompatible with the mainline kernel (e.g. if you are using kernel image from perf-opencsd and using perf tool from mainline kernel, it's likely not work).
I've tried directly compile the last mainline kernel and its perf, but its perf cannot fetch the cs_etm event. (coresight).
Could you give more detailed info (like commands and logs) so others can help you to analyze potential issue?
After that, I additional included the opencsd lib (only opencsd lib, not perf-opencsd), but it happened "parser error" and "unknown term".
Just remind, from my understanding, OpenCSD lib is relevant with CoreSight trace decoding, so even without linking OpenCSD lib for perf tool, it still can capture trace data with command:
perf record -e cs_etm/@tmc_etr0/u --per-thread program
So more detailed info might can be helpful.
Thanks, Leo
Hi Eric,
On Wed, Jun 10, 2020 at 01:01:09PM +0800, H MJ wrote:
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error
This is not right, please specify the correct sink name. For how to find the correct sink name, please follow kernel document: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docu...
Usually, you need to specify event name as 'cs_etm/@tmc_etr0', or 'cs_etm/@tmc_etf0', etc.
[...]
Thank you very much.
Welcome!
Thanks, Leo
On Wed, Jun 10, 2020 at 01:24:32PM +0800, Leo Yan wrote:
Hi Eric,
On Wed, Jun 10, 2020 at 01:01:09PM +0800, H MJ wrote:
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error
This is not right, please specify the correct sink name. For how to find the correct sink name, please follow kernel document: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docu...
Usually, you need to specify event name as 'cs_etm/@tmc_etr0', or 'cs_etm/@tmc_etf0', etc.
Sorry, should note, the forward slashes is important. So correct as below:
'cs_etm/@tmc_etr0/' 'cs_etm/@tmc_etf0/'
Thanks, Leo
Dear Leo,
I tried these, the error messages as follow,
# ./perf_mi record -e cs_etm/@tmc_etr0/ --per-thread ls failed to set config "tmc_etr0" on event cs_etm/@tmc_etr0/ with 2 (No such file or directory)
# ./perf_mi10 record -e cs_etm/@tmc_etf0/ --per-thread ls failed to set config "tmc_etf0" on event cs_etm/@tmc_etf0/ with 2 (No such file or directory)
Thanks BRs, Eric
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 下午1:26寫道:
On Wed, Jun 10, 2020 at 01:24:32PM +0800, Leo Yan wrote:
Hi Eric,
On Wed, Jun 10, 2020 at 01:01:09PM +0800, H MJ wrote:
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error
This is not right, please specify the correct sink name. For how to find the correct sink name, please follow kernel document: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docu...
Usually, you need to specify event name as 'cs_etm/@tmc_etr0', or 'cs_etm/@tmc_etf0', etc.
Sorry, should note, the forward slashes is important. So correct as below:
'cs_etm/@tmc_etr0/' 'cs_etm/@tmc_etf0/'
Thanks, Leo
Dear Leo,
Thanks for replaying, again.
I don't have the folder (/sys/bus/event_source/devices/cs_etm/sinks). Does it mean that I cannot use the coresight?
But I can see many devices in `/sys/bus/coresight/devices/`
Thanks, BRs. Eric
coresight-audio-etm0 coresight-cti-npu_dl_cti_0 coresight-funnel-ddr-ch13 coresight-tpda-swao coresight-csr coresight-cti-npu_dl_cti_1 coresight-funnel-dl-center coresight-tpdm-actpm coresight-cti-apss_cti0 coresight-cti-npu_q6_cti coresight-funnel-dl-compute coresight-tpdm-apss coresight-cti-apss_cti1 coresight-cti-swao_cti0 coresight-funnel-dl-mm coresight-tpdm-ddr coresight-cti-apss_cti2 coresight-cti-swao_cti1 coresight-funnel-dl-north coresight-tpdm-ddr-ch02 coresight-cti-compute_dl_cti coresight-cti-swao_cti2 coresight-funnel-dl-south coresight-tpdm-ddr-ch13 coresight-cti-cpu0 coresight-cti-swao_cti3 coresight-funnel-gpu coresight-tpdm-dl-north coresight-cti-cpu1 coresight-cti-turing_dl_cti coresight-funnel-in0 coresight-tpdm-dl-south coresight-cti-cpu2 coresight-cti-turing_q6_cti coresight-funnel-in1 coresight-tpdm-dlct coresight-cti-cpu3 coresight-cti0 coresight-funnel-lpass coresight-tpdm-gpu coresight-cti-cpu4 coresight-cti1 coresight-funnel-merg coresight-tpdm-ipcc coresight-cti-cpu5 coresight-cti10 coresight-funnel-npu coresight-tpdm-llm-gold coresight-cti-cpu6 coresight-cti11 coresight-funnel-qatb coresight-tpdm-llm-silver coresight-cti-cpu7 coresight-cti12 coresight-funnel-swao coresight-tpdm-lpass coresight-cti-ddr_ch02_dl_cti_0 coresight-cti13 coresight-funnel-turing coresight-tpdm-lpass-lpi coresight-cti-ddr_ch13_dl_cti_0 coresight-cti14 coresight-funnel-venus coresight-tpdm-mdss coresight-cti-ddr_dl_0_cti_0 coresight-cti15 coresight-hwevent coresight-tpdm-mm coresight-cti-ddr_dl_0_cti_1 coresight-cti2 coresight-npu-etm0 coresight-tpdm-npu coresight-cti-ddr_dl_0_cti_2 coresight-cti3 coresight-replicator-qdss coresight-tpdm-npu-dpm coresight-cti-ddr_dl_1_cti_0 coresight-cti4 coresight-replicator-swao coresight-tpdm-npu-llm coresight-cti-ddr_dl_1_cti_1 coresight-cti5 coresight-ssc-etm0 coresight-tpdm-pimem coresight-cti-ddr_dl_1_cti_2 coresight-cti6 coresight-stm coresight-tpdm-prng coresight-cti-dlct_cti0 coresight-cti7 coresight-swao-csr coresight-tpdm-qm coresight-cti-dlct_cti1 coresight-cti8 coresight-tgu-ipcb coresight-tpdm-swao-0 coresight-cti-dlct_cti2 coresight-cti9 coresight-tmc-etf coresight-tpdm-swao-1 coresight-cti-dlmm_cti0 coresight-eud coresight-tmc-etr coresight-tpdm-turing coresight-cti-dlmm_cti1 coresight-funnel-apss coresight-tpda coresight-tpdm-venus coresight-cti-iris_dl_cti coresight-funnel-apss-merg coresight-tpda-apss coresight-turing-etm0 coresight-cti-lpass_dl_cti coresight-funnel-ddr-0 coresight-tpda-dl-north coresight-cti-mdss_dl_cti coresight-funnel-ddr-ch02 coresight-tpda-dl-south
ls /sys/bus/coresight/devices/
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 下午1:24寫道:
Hi Eric,
On Wed, Jun 10, 2020 at 01:01:09PM +0800, H MJ wrote:
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error
This is not right, please specify the correct sink name. For how to find the correct sink name, please follow kernel document: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docu...
Usually, you need to specify event name as 'cs_etm/@tmc_etr0', or 'cs_etm/@tmc_etf0', etc.
[...]
Thank you very much.
Welcome!
Thanks, Leo
I don't have the folder (/sys/bus/event_source/devices/cs_etm/sinks). Does it mean that I cannot use the coresight?
Do you see /sys/devices/cs_etm ? Do you see /sys/devices/cs_etm/sinks ? Does "perf list cs_etm" show anything?
Al
But I can see many devices in `/sys/bus/coresight/devices/`
Thanks, BRs. Eric
coresight-audio-etm0 coresight-cti-npu_dl_cti_0 coresight-funnel-ddr-ch13 coresight-tpda-swao coresight-csr coresight-cti-npu_dl_cti_1 coresight-funnel-dl-center coresight-tpdm-actpm coresight-cti-apss_cti0 coresight-cti-npu_q6_cti coresight-funnel-dl-compute coresight-tpdm-apss coresight-cti-apss_cti1 coresight-cti-swao_cti0 coresight-funnel-dl-mm coresight-tpdm-ddr coresight-cti-apss_cti2 coresight-cti-swao_cti1 coresight-funnel-dl-north coresight-tpdm-ddr-ch02 coresight-cti-compute_dl_cti coresight-cti-swao_cti2 coresight-funnel-dl-south coresight-tpdm-ddr-ch13 coresight-cti-cpu0 coresight-cti-swao_cti3 coresight-funnel-gpu coresight-tpdm-dl-north coresight-cti-cpu1 coresight-cti-turing_dl_cti coresight-funnel-in0 coresight-tpdm-dl-south coresight-cti-cpu2 coresight-cti-turing_q6_cti coresight-funnel-in1 coresight-tpdm-dlct coresight-cti-cpu3 coresight-cti0 coresight-funnel-lpass coresight-tpdm-gpu coresight-cti-cpu4 coresight-cti1 coresight-funnel-merg coresight-tpdm-ipcc coresight-cti-cpu5 coresight-cti10 coresight-funnel-npu coresight-tpdm-llm-gold coresight-cti-cpu6 coresight-cti11 coresight-funnel-qatb coresight-tpdm-llm-silver coresight-cti-cpu7 coresight-cti12 coresight-funnel-swao coresight-tpdm-lpass coresight-cti-ddr_ch02_dl_cti_0 coresight-cti13 coresight-funnel-turing coresight-tpdm-lpass-lpi coresight-cti-ddr_ch13_dl_cti_0 coresight-cti14 coresight-funnel-venus coresight-tpdm-mdss coresight-cti-ddr_dl_0_cti_0 coresight-cti15 coresight-hwevent coresight-tpdm-mm coresight-cti-ddr_dl_0_cti_1 coresight-cti2 coresight-npu-etm0 coresight-tpdm-npu coresight-cti-ddr_dl_0_cti_2 coresight-cti3 coresight-replicator-qdss coresight-tpdm-npu-dpm coresight-cti-ddr_dl_1_cti_0 coresight-cti4 coresight-replicator-swao coresight-tpdm-npu-llm coresight-cti-ddr_dl_1_cti_1 coresight-cti5 coresight-ssc-etm0 coresight-tpdm-pimem coresight-cti-ddr_dl_1_cti_2 coresight-cti6 coresight-stm coresight-tpdm-prng coresight-cti-dlct_cti0 coresight-cti7 coresight-swao-csr coresight-tpdm-qm coresight-cti-dlct_cti1 coresight-cti8 coresight-tgu-ipcb coresight-tpdm-swao-0 coresight-cti-dlct_cti2 coresight-cti9 coresight-tmc-etf coresight-tpdm-swao-1 coresight-cti-dlmm_cti0 coresight-eud coresight-tmc-etr coresight-tpdm-turing coresight-cti-dlmm_cti1 coresight-funnel-apss coresight-tpda coresight-tpdm-venus coresight-cti-iris_dl_cti coresight-funnel-apss-merg coresight-tpda-apss coresight-turing-etm0 coresight-cti-lpass_dl_cti coresight-funnel-ddr-0 coresight-tpda-dl-north coresight-cti-mdss_dl_cti coresight-funnel-ddr-ch02 coresight-tpda-dl-south
ls /sys/bus/coresight/devices/
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 下午1:24寫道:
Hi Eric,
On Wed, Jun 10, 2020 at 01:01:09PM +0800, H MJ wrote:
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error
This is not right, please specify the correct sink name. For how to find the correct sink name, please follow kernel document: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tre e/Documentation/trace/coresight/coresight.rst#n467
Usually, you need to specify event name as 'cs_etm/@tmc_etr0', or 'cs_etm/@tmc_etf0', etc.
[...]
Thank you very much.
Welcome!
Thanks, Leo
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Dear AI,
Big Thank for your replaying.
==> I can see "/sys/devices/cs_etm".
==> I cannot see "/sys/devices/cs_etm/sinks " # ls /sys/devices/cs_etm/ format nr_addr_filters perf_event_mux_interval_ms power subsystem type uevent
==> perf_mi10 list cs_etm cs_etm// [Kernel PMU event]
Big Thanks. BRs, Eric
Al Grant Al.Grant@arm.com 於 2020年6月10日 週三 下午3:15寫道:
I don't have the folder (/sys/bus/event_source/devices/cs_etm/sinks). Does it mean that I cannot use the coresight?
Do you see /sys/devices/cs_etm ? Do you see /sys/devices/cs_etm/sinks ? Does "perf list cs_etm" show anything?
Al
But I can see many devices in `/sys/bus/coresight/devices/`
Thanks, BRs. Eric
coresight-audio-etm0 coresight-cti-npu_dl_cti_0 coresight-funnel-ddr-ch13 coresight-tpda-swao coresight-csr coresight-cti-npu_dl_cti_1 coresight-funnel-dl-center coresight-tpdm-actpm coresight-cti-apss_cti0 coresight-cti-npu_q6_cti coresight-funnel-dl-compute coresight-tpdm-apss coresight-cti-apss_cti1 coresight-cti-swao_cti0 coresight-funnel-dl-mm coresight-tpdm-ddr coresight-cti-apss_cti2 coresight-cti-swao_cti1 coresight-funnel-dl-north coresight-tpdm-ddr-ch02 coresight-cti-compute_dl_cti coresight-cti-swao_cti2 coresight-funnel-dl-south coresight-tpdm-ddr-ch13 coresight-cti-cpu0 coresight-cti-swao_cti3 coresight-funnel-gpu coresight-tpdm-dl-north coresight-cti-cpu1 coresight-cti-turing_dl_cti coresight-funnel-in0 coresight-tpdm-dl-south coresight-cti-cpu2 coresight-cti-turing_q6_cti coresight-funnel-in1 coresight-tpdm-dlct coresight-cti-cpu3 coresight-cti0 coresight-funnel-lpass coresight-tpdm-gpu coresight-cti-cpu4 coresight-cti1 coresight-funnel-merg coresight-tpdm-ipcc coresight-cti-cpu5 coresight-cti10 coresight-funnel-npu coresight-tpdm-llm-gold coresight-cti-cpu6 coresight-cti11 coresight-funnel-qatb coresight-tpdm-llm-silver coresight-cti-cpu7 coresight-cti12 coresight-funnel-swao coresight-tpdm-lpass coresight-cti-ddr_ch02_dl_cti_0 coresight-cti13 coresight-funnel-turing coresight-tpdm-lpass-lpi coresight-cti-ddr_ch13_dl_cti_0 coresight-cti14 coresight-funnel-venus coresight-tpdm-mdss coresight-cti-ddr_dl_0_cti_0 coresight-cti15 coresight-hwevent coresight-tpdm-mm coresight-cti-ddr_dl_0_cti_1 coresight-cti2 coresight-npu-etm0 coresight-tpdm-npu coresight-cti-ddr_dl_0_cti_2 coresight-cti3 coresight-replicator-qdss coresight-tpdm-npu-dpm coresight-cti-ddr_dl_1_cti_0 coresight-cti4 coresight-replicator-swao coresight-tpdm-npu-llm coresight-cti-ddr_dl_1_cti_1 coresight-cti5 coresight-ssc-etm0 coresight-tpdm-pimem coresight-cti-ddr_dl_1_cti_2 coresight-cti6 coresight-stm coresight-tpdm-prng coresight-cti-dlct_cti0 coresight-cti7 coresight-swao-csr coresight-tpdm-qm coresight-cti-dlct_cti1 coresight-cti8 coresight-tgu-ipcb coresight-tpdm-swao-0 coresight-cti-dlct_cti2 coresight-cti9 coresight-tmc-etf coresight-tpdm-swao-1 coresight-cti-dlmm_cti0 coresight-eud coresight-tmc-etr coresight-tpdm-turing coresight-cti-dlmm_cti1 coresight-funnel-apss coresight-tpda coresight-tpdm-venus coresight-cti-iris_dl_cti coresight-funnel-apss-merg coresight-tpda-apss coresight-turing-etm0 coresight-cti-lpass_dl_cti coresight-funnel-ddr-0 coresight-tpda-dl-north coresight-cti-mdss_dl_cti coresight-funnel-ddr-ch02 coresight-tpda-dl-south
ls /sys/bus/coresight/devices/
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 下午1:24寫道:
Hi Eric,
On Wed, Jun 10, 2020 at 01:01:09PM +0800, H MJ wrote:
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error
This is not right, please specify the correct sink name. For how to find the correct sink name, please follow kernel document: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tre e/Documentation/trace/coresight/coresight.rst#n467
Usually, you need to specify event name as 'cs_etm/@tmc_etr0', or 'cs_etm/@tmc_etf0', etc.
[...]
Thank you very much.
Welcome!
Thanks, Leo
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Dears,
I am trying to get the data, but still failed. (orz..) If you have any suggestion or possible solutions, please tell me.
Big thank, again. BRs, Eric.
H MJ eric.mjh123@gmail.com 於 2020年6月10日 週三 下午3:38寫道:
Dear AI,
Big Thank for your replaying.
==> I can see "/sys/devices/cs_etm".
==> I cannot see "/sys/devices/cs_etm/sinks " # ls /sys/devices/cs_etm/ format nr_addr_filters perf_event_mux_interval_ms power subsystem type uevent
==> perf_mi10 list cs_etm cs_etm// [Kernel PMU event]
Big Thanks. BRs, Eric
Al Grant Al.Grant@arm.com 於 2020年6月10日 週三 下午3:15寫道:
I don't have the folder (/sys/bus/event_source/devices/cs_etm/sinks). Does it mean that I cannot use the coresight?
Do you see /sys/devices/cs_etm ? Do you see /sys/devices/cs_etm/sinks ? Does "perf list cs_etm" show anything?
Al
But I can see many devices in `/sys/bus/coresight/devices/`
Thanks, BRs. Eric
coresight-audio-etm0 coresight-cti-npu_dl_cti_0 coresight-funnel-ddr-ch13 coresight-tpda-swao coresight-csr coresight-cti-npu_dl_cti_1 coresight-funnel-dl-center coresight-tpdm-actpm coresight-cti-apss_cti0 coresight-cti-npu_q6_cti coresight-funnel-dl-compute coresight-tpdm-apss coresight-cti-apss_cti1 coresight-cti-swao_cti0 coresight-funnel-dl-mm coresight-tpdm-ddr coresight-cti-apss_cti2 coresight-cti-swao_cti1 coresight-funnel-dl-north coresight-tpdm-ddr-ch02 coresight-cti-compute_dl_cti coresight-cti-swao_cti2 coresight-funnel-dl-south coresight-tpdm-ddr-ch13 coresight-cti-cpu0 coresight-cti-swao_cti3 coresight-funnel-gpu coresight-tpdm-dl-north coresight-cti-cpu1 coresight-cti-turing_dl_cti coresight-funnel-in0 coresight-tpdm-dl-south coresight-cti-cpu2 coresight-cti-turing_q6_cti coresight-funnel-in1 coresight-tpdm-dlct coresight-cti-cpu3 coresight-cti0 coresight-funnel-lpass coresight-tpdm-gpu coresight-cti-cpu4 coresight-cti1 coresight-funnel-merg coresight-tpdm-ipcc coresight-cti-cpu5 coresight-cti10 coresight-funnel-npu coresight-tpdm-llm-gold coresight-cti-cpu6 coresight-cti11 coresight-funnel-qatb coresight-tpdm-llm-silver coresight-cti-cpu7 coresight-cti12 coresight-funnel-swao coresight-tpdm-lpass coresight-cti-ddr_ch02_dl_cti_0 coresight-cti13 coresight-funnel-turing coresight-tpdm-lpass-lpi coresight-cti-ddr_ch13_dl_cti_0 coresight-cti14 coresight-funnel-venus coresight-tpdm-mdss coresight-cti-ddr_dl_0_cti_0 coresight-cti15 coresight-hwevent coresight-tpdm-mm coresight-cti-ddr_dl_0_cti_1 coresight-cti2 coresight-npu-etm0 coresight-tpdm-npu coresight-cti-ddr_dl_0_cti_2 coresight-cti3 coresight-replicator-qdss coresight-tpdm-npu-dpm coresight-cti-ddr_dl_1_cti_0 coresight-cti4 coresight-replicator-swao coresight-tpdm-npu-llm coresight-cti-ddr_dl_1_cti_1 coresight-cti5 coresight-ssc-etm0 coresight-tpdm-pimem coresight-cti-ddr_dl_1_cti_2 coresight-cti6 coresight-stm coresight-tpdm-prng coresight-cti-dlct_cti0 coresight-cti7 coresight-swao-csr coresight-tpdm-qm coresight-cti-dlct_cti1 coresight-cti8 coresight-tgu-ipcb coresight-tpdm-swao-0 coresight-cti-dlct_cti2 coresight-cti9 coresight-tmc-etf coresight-tpdm-swao-1 coresight-cti-dlmm_cti0 coresight-eud coresight-tmc-etr coresight-tpdm-turing coresight-cti-dlmm_cti1 coresight-funnel-apss coresight-tpda coresight-tpdm-venus coresight-cti-iris_dl_cti coresight-funnel-apss-merg coresight-tpda-apss coresight-turing-etm0 coresight-cti-lpass_dl_cti coresight-funnel-ddr-0 coresight-tpda-dl-north coresight-cti-mdss_dl_cti coresight-funnel-ddr-ch02 coresight-tpda-dl-south
ls /sys/bus/coresight/devices/
Leo Yan leo.yan@linaro.org 於 2020年6月10日 週三 下午1:24寫道:
Hi Eric,
On Wed, Jun 10, 2020 at 01:01:09PM +0800, H MJ wrote:
Dear Leo,
Thanks again for this replaying.
I tried two commands by using the new build version (new perf and kernel), but its perf got same error.
# ./perf_mi_1817 record -e cs_etm/@coresight-tmc-etr/ --per-thread ls event syntax error: 'cs_etm/@coresight-tmc-etr/' ___ parser error
This is not right, please specify the correct sink name. For how to find the correct sink name, please follow kernel document: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tre e/Documentation/trace/coresight/coresight.rst#n467
Usually, you need to specify event name as 'cs_etm/@tmc_etr0', or 'cs_etm/@tmc_etf0', etc.
[...]
Thank you very much.
Welcome!
Thanks, Leo
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Hi Eric,
On Thu, Jun 11, 2020 at 10:23:09AM +0800, H MJ wrote:
Dears,
I am trying to get the data, but still failed. (orz..) If you have any suggestion or possible solutions, please tell me.
Based on your yersterday shared log, seems ETM has not been initialized properly. So suggest to firstly check if CoreSight devices have been initialized or not.
Could you check below folder?
# ls /sys/bus/coresight/devices/ etm0 etm2 etm4 funnel0 funnel2 funnel4 stm0 tmc_etf1 tpiu0 etm1 etm3 etm5 funnel1 funnel3 replicator0 tmc_etf0 tmc_etr0
And please confirm if ETM/ETR/ETF has been initialized or not, a simple way is to use below command:
# dmesg | grep -i coresight [ 5.390787] coresight-tmc 20070000.etr: Adding to iommu group 1 [ 5.400714] coresight etm2: CPU2: ETM v4.0 initialized [ 5.407232] coresight etm3: CPU3: ETM v4.0 initialized [ 5.412955] coresight etm4: CPU4: ETM v4.0 initialized [ 5.418689] coresight etm5: CPU5: ETM v4.0 initialized [ 5.425828] coresight etm1: CPU1: ETM v4.0 initialized [ 5.431517] coresight stm0: STM500 initialized [ 5.436390] coresight etm0: CPU0: ETM v4.0 initialized
Thanks, Leo
H MJ eric.mjh123@gmail.com 於 2020年6月10日 週三 下午3:38寫道:
Dear AI,
Big Thank for your replaying.
==> I can see "/sys/devices/cs_etm".
==> I cannot see "/sys/devices/cs_etm/sinks " # ls /sys/devices/cs_etm/ format nr_addr_filters perf_event_mux_interval_ms power subsystem type uevent
==> perf_mi10 list cs_etm cs_etm// [Kernel PMU event]
Big Thanks. BRs, Eric
Dear Leo,
Thanks for this replaying.
After keying two commands, I got these information.
Thanks.!!! BRs, Eric
# ls /sys/bus/coresight/devices/ coresight-audio-etm0 coresight-cti-dlct_cti2 coresight-cti3 coresight-funnel-qatb coresight-tpdm-dl-north coresight-csr coresight-cti-dlmm_cti0 coresight-cti4 coresight-funnel-swao coresight-tpdm-dl-south coresight-cti-apss_cti0 coresight-cti-dlmm_cti1 coresight-cti5 coresight-funnel-turing coresight-tpdm-dlct coresight-cti-apss_cti1 coresight-cti-iris_dl_cti coresight-cti6 coresight-funnel-venus coresight-tpdm-gpu coresight-cti-apss_cti2 coresight-cti-lpass_dl_cti coresight-cti7 coresight-hwevent coresight-tpdm-ipcc coresight-cti-compute_dl_cti coresight-cti-mdss_dl_cti coresight-cti8 coresight-npu-etm0 coresight-tpdm-llm-gold coresight-cti-cpu0 coresight-cti-npu_dl_cti_0 coresight-cti9 coresight-replicator-qdss coresight-tpdm-llm-silver coresight-cti-cpu1 coresight-cti-npu_dl_cti_1 coresight-eud coresight-replicator-swao coresight-tpdm-lpass coresight-cti-cpu2 coresight-cti-npu_q6_cti coresight-funnel-apss coresight-ssc-etm0 coresight-tpdm-lpass-lpi coresight-cti-cpu3 coresight-cti-swao_cti0 coresight-funnel-apss-merg coresight-stm coresight-tpdm-mdss coresight-cti-cpu4 coresight-cti-swao_cti1 coresight-funnel-ddr-0 coresight-swao-csr coresight-tpdm-mm coresight-cti-cpu5 coresight-cti-swao_cti2 coresight-funnel-ddr-ch02 coresight-tgu-ipcb coresight-tpdm-npu coresight-cti-cpu6 coresight-cti-swao_cti3 coresight-funnel-ddr-ch13 coresight-tmc-etf coresight-tpdm-npu-dpm coresight-cti-cpu7 coresight-cti-turing_dl_cti coresight-funnel-dl-center coresight-tmc-etr coresight-tpdm-npu-llm coresight-cti-ddr_ch02_dl_cti_0 coresight-cti-turing_q6_cti coresight-funnel-dl-compute coresight-tpda coresight-tpdm-pimem coresight-cti-ddr_ch13_dl_cti_0 coresight-cti0 coresight-funnel-dl-mm coresight-tpda-apss coresight-tpdm-prng coresight-cti-ddr_dl_0_cti_0 coresight-cti1 coresight-funnel-dl-north coresight-tpda-dl-north coresight-tpdm-qm coresight-cti-ddr_dl_0_cti_1 coresight-cti10 coresight-funnel-dl-south coresight-tpda-dl-south coresight-tpdm-swao-0 coresight-cti-ddr_dl_0_cti_2 coresight-cti11 coresight-funnel-gpu coresight-tpda-swao coresight-tpdm-swao-1 coresight-cti-ddr_dl_1_cti_0 coresight-cti12 coresight-funnel-in0 coresight-tpdm-actpm coresight-tpdm-turing coresight-cti-ddr_dl_1_cti_1 coresight-cti13 coresight-funnel-in1 coresight-tpdm-apss coresight-tpdm-venus coresight-cti-ddr_dl_1_cti_2 coresight-cti14 coresight-funnel-lpass coresight-tpdm-ddr coresight-turing-etm0 coresight-cti-dlct_cti0 coresight-cti15 coresight-funnel-merg coresight-tpdm-ddr-ch02 coresight-cti-dlct_cti1 coresight-cti2 coresight-funnel-npu coresight-tpdm-ddr-ch13
# umi:/ # dmesg | grep -i coresight [ 0.785099] coresight-tmc 6048000.tmc: Linked as a consumer to 15000000.apps-smmu [ 0.785606] coresight-funnel 6902000.funnel: Linked as a consumer to regulator.74 [ 0.785618] coresight-funnel 6902000.funnel: Linked as a consumer to regulator.75 [ 0.786375] coresight-funnel 6c44000.funnel: Linked as a consumer to regulator.85 [ 0.786386] coresight-funnel 6c44000.funnel: Linked as a consumer to regulator.4 [ 0.787023] coresight-stm 6002000.stm: stm_register_device failed, probing deffered [ 0.789033] coresight-tpdm 6900000.tpdm: Linked as a consumer to regulator.74 [ 0.789045] coresight-tpdm 6900000.tpdm: Linked as a consumer to regulator.75 [ 0.790246] coresight-tpdm 6c47000.tpdm: Linked as a consumer to regulator.85 [ 0.790255] coresight-tpdm 6c47000.tpdm: Linked as a consumer to regulator.4 [ 0.790463] coresight-tpdm 6c40000.tpdm: Linked as a consumer to regulator.85 [ 0.790472] coresight-tpdm 6c40000.tpdm: Linked as a consumer to regulator.4 [ 0.790758] coresight-tpdm 6c41000.tpdm: Linked as a consumer to regulator.85 [ 0.790767] coresight-tpdm 6c41000.tpdm: Linked as a consumer to regulator.4 [ 0.792248] coresight-csr 6001000.csr: CSR initialized: coresight-csr [ 0.792278] coresight-csr 6b0c000.csr: CSR initialized: coresight-swao-csr [ 0.792383] coresight-hwevent soc:hwevent: Hardware Event driver initialized [ 0.792472] coresight-dummy soc:dummy_sink: Dummy device initialized [ 0.792516] coresight-dummy soc:tpdm@6b26000: Dummy device initialized [ 0.792656] coresight-remote-etm soc:turing_etm0: Remote ETM initialized [ 0.792705] coresight-remote-etm soc:audio_etm0: Remote ETM initialized [ 0.792752] coresight-remote-etm soc:ssc_etm0: Remote ETM initialized [ 0.792803] coresight-remote-etm soc:npu_etm0: Remote ETM initialized [ 1.310377] coresight-tmc 6b05000.tmc: invalid cti data [ 1.310723] coresight-stm 6002000.stm: STM32 initialized with master Disabled [ 5.202924] coresight-remote-etm soc:audio_etm0: Connection established between QMI handle and 5 service [ 5.202929] coresight-remote-etm soc:ssc_etm0: Connection established between QMI handle and 8 service [ 5.216469] coresight-remote-etm soc:npu_etm0: Connection established between QMI handle and 14 service [ 5.224839] coresight-remote-etm soc:turing_etm0: Connection established between QMI handle and 13 service
Leo Yan leo.yan@linaro.org 於 2020年6月11日 週四 下午1:58寫道:
Hi Eric,
On Thu, Jun 11, 2020 at 10:23:09AM +0800, H MJ wrote:
Dears,
I am trying to get the data, but still failed. (orz..) If you have any suggestion or possible solutions, please tell me.
Based on your yersterday shared log, seems ETM has not been initialized properly. So suggest to firstly check if CoreSight devices have been initialized or not.
Could you check below folder?
# ls /sys/bus/coresight/devices/ etm0 etm2 etm4 funnel0 funnel2 funnel4 stm0 tmc_etf1 tpiu0 etm1 etm3 etm5 funnel1 funnel3 replicator0 tmc_etf0 tmc_etr0
And please confirm if ETM/ETR/ETF has been initialized or not, a simple way is to use below command:
# dmesg | grep -i coresight [ 5.390787] coresight-tmc 20070000.etr: Adding to iommu group 1 [ 5.400714] coresight etm2: CPU2: ETM v4.0 initialized [ 5.407232] coresight etm3: CPU3: ETM v4.0 initialized [ 5.412955] coresight etm4: CPU4: ETM v4.0 initialized [ 5.418689] coresight etm5: CPU5: ETM v4.0 initialized [ 5.425828] coresight etm1: CPU1: ETM v4.0 initialized [ 5.431517] coresight stm0: STM500 initialized [ 5.436390] coresight etm0: CPU0: ETM v4.0 initialized
Thanks, Leo
H MJ eric.mjh123@gmail.com 於 2020年6月10日 週三 下午3:38寫道:
Dear AI,
Big Thank for your replaying.
==> I can see "/sys/devices/cs_etm".
==> I cannot see "/sys/devices/cs_etm/sinks " # ls /sys/devices/cs_etm/ format nr_addr_filters perf_event_mux_interval_ms power subsystem type uevent
==> perf_mi10 list cs_etm cs_etm// [Kernel PMU event]
Big Thanks. BRs, Eric
Dear Leo,
I am sorry for sending this mail. Did you have any suggestions for me to try this problem.
Thanks again, BRs, Eric
H MJ eric.mjh123@gmail.com 於 2020年6月11日 週四 下午2:12寫道:
Dear Leo,
Thanks for this replaying.
After keying two commands, I got these information.
Thanks.!!! BRs, Eric
# ls /sys/bus/coresight/devices/ coresight-audio-etm0 coresight-cti-dlct_cti2 coresight-cti3 coresight-funnel-qatb coresight-tpdm-dl-north coresight-csr coresight-cti-dlmm_cti0 coresight-cti4 coresight-funnel-swao coresight-tpdm-dl-south coresight-cti-apss_cti0 coresight-cti-dlmm_cti1 coresight-cti5 coresight-funnel-turing coresight-tpdm-dlct coresight-cti-apss_cti1 coresight-cti-iris_dl_cti coresight-cti6 coresight-funnel-venus coresight-tpdm-gpu coresight-cti-apss_cti2 coresight-cti-lpass_dl_cti coresight-cti7 coresight-hwevent coresight-tpdm-ipcc coresight-cti-compute_dl_cti coresight-cti-mdss_dl_cti coresight-cti8 coresight-npu-etm0 coresight-tpdm-llm-gold coresight-cti-cpu0 coresight-cti-npu_dl_cti_0 coresight-cti9 coresight-replicator-qdss coresight-tpdm-llm-silver coresight-cti-cpu1 coresight-cti-npu_dl_cti_1 coresight-eud coresight-replicator-swao coresight-tpdm-lpass coresight-cti-cpu2 coresight-cti-npu_q6_cti coresight-funnel-apss coresight-ssc-etm0 coresight-tpdm-lpass-lpi coresight-cti-cpu3 coresight-cti-swao_cti0 coresight-funnel-apss-merg coresight-stm coresight-tpdm-mdss coresight-cti-cpu4 coresight-cti-swao_cti1 coresight-funnel-ddr-0 coresight-swao-csr coresight-tpdm-mm coresight-cti-cpu5 coresight-cti-swao_cti2 coresight-funnel-ddr-ch02 coresight-tgu-ipcb coresight-tpdm-npu coresight-cti-cpu6 coresight-cti-swao_cti3 coresight-funnel-ddr-ch13 coresight-tmc-etf coresight-tpdm-npu-dpm coresight-cti-cpu7 coresight-cti-turing_dl_cti coresight-funnel-dl-center coresight-tmc-etr coresight-tpdm-npu-llm coresight-cti-ddr_ch02_dl_cti_0 coresight-cti-turing_q6_cti coresight-funnel-dl-compute coresight-tpda coresight-tpdm-pimem coresight-cti-ddr_ch13_dl_cti_0 coresight-cti0 coresight-funnel-dl-mm coresight-tpda-apss coresight-tpdm-prng coresight-cti-ddr_dl_0_cti_0 coresight-cti1 coresight-funnel-dl-north coresight-tpda-dl-north coresight-tpdm-qm coresight-cti-ddr_dl_0_cti_1 coresight-cti10 coresight-funnel-dl-south coresight-tpda-dl-south coresight-tpdm-swao-0 coresight-cti-ddr_dl_0_cti_2 coresight-cti11 coresight-funnel-gpu coresight-tpda-swao coresight-tpdm-swao-1 coresight-cti-ddr_dl_1_cti_0 coresight-cti12 coresight-funnel-in0 coresight-tpdm-actpm coresight-tpdm-turing coresight-cti-ddr_dl_1_cti_1 coresight-cti13 coresight-funnel-in1 coresight-tpdm-apss coresight-tpdm-venus coresight-cti-ddr_dl_1_cti_2 coresight-cti14 coresight-funnel-lpass coresight-tpdm-ddr coresight-turing-etm0 coresight-cti-dlct_cti0 coresight-cti15 coresight-funnel-merg coresight-tpdm-ddr-ch02 coresight-cti-dlct_cti1 coresight-cti2 coresight-funnel-npu coresight-tpdm-ddr-ch13
# umi:/ # dmesg | grep -i coresight [ 0.785099] coresight-tmc 6048000.tmc: Linked as a consumer to 15000000.apps-smmu [ 0.785606] coresight-funnel 6902000.funnel: Linked as a consumer to regulator.74 [ 0.785618] coresight-funnel 6902000.funnel: Linked as a consumer to regulator.75 [ 0.786375] coresight-funnel 6c44000.funnel: Linked as a consumer to regulator.85 [ 0.786386] coresight-funnel 6c44000.funnel: Linked as a consumer to regulator.4 [ 0.787023] coresight-stm 6002000.stm: stm_register_device failed, probing deffered [ 0.789033] coresight-tpdm 6900000.tpdm: Linked as a consumer to regulator.74 [ 0.789045] coresight-tpdm 6900000.tpdm: Linked as a consumer to regulator.75 [ 0.790246] coresight-tpdm 6c47000.tpdm: Linked as a consumer to regulator.85 [ 0.790255] coresight-tpdm 6c47000.tpdm: Linked as a consumer to regulator.4 [ 0.790463] coresight-tpdm 6c40000.tpdm: Linked as a consumer to regulator.85 [ 0.790472] coresight-tpdm 6c40000.tpdm: Linked as a consumer to regulator.4 [ 0.790758] coresight-tpdm 6c41000.tpdm: Linked as a consumer to regulator.85 [ 0.790767] coresight-tpdm 6c41000.tpdm: Linked as a consumer to regulator.4 [ 0.792248] coresight-csr 6001000.csr: CSR initialized: coresight-csr [ 0.792278] coresight-csr 6b0c000.csr: CSR initialized: coresight-swao-csr [ 0.792383] coresight-hwevent soc:hwevent: Hardware Event driver initialized [ 0.792472] coresight-dummy soc:dummy_sink: Dummy device initialized [ 0.792516] coresight-dummy soc:tpdm@6b26000: Dummy device initialized [ 0.792656] coresight-remote-etm soc:turing_etm0: Remote ETM initialized [ 0.792705] coresight-remote-etm soc:audio_etm0: Remote ETM initialized [ 0.792752] coresight-remote-etm soc:ssc_etm0: Remote ETM initialized [ 0.792803] coresight-remote-etm soc:npu_etm0: Remote ETM initialized [ 1.310377] coresight-tmc 6b05000.tmc: invalid cti data [ 1.310723] coresight-stm 6002000.stm: STM32 initialized with master Disabled [ 5.202924] coresight-remote-etm soc:audio_etm0: Connection established between QMI handle and 5 service [ 5.202929] coresight-remote-etm soc:ssc_etm0: Connection established between QMI handle and 8 service [ 5.216469] coresight-remote-etm soc:npu_etm0: Connection established between QMI handle and 14 service [ 5.224839] coresight-remote-etm soc:turing_etm0: Connection established between QMI handle and 13 service
Leo Yan leo.yan@linaro.org 於 2020年6月11日 週四 下午1:58寫道:
Hi Eric,
On Thu, Jun 11, 2020 at 10:23:09AM +0800, H MJ wrote:
Dears,
I am trying to get the data, but still failed. (orz..) If you have any suggestion or possible solutions, please tell me.
Based on your yersterday shared log, seems ETM has not been initialized properly. So suggest to firstly check if CoreSight devices have been initialized or not.
Could you check below folder?
# ls /sys/bus/coresight/devices/ etm0 etm2 etm4 funnel0 funnel2 funnel4 stm0 tmc_etf1 tpiu0 etm1 etm3 etm5 funnel1 funnel3 replicator0 tmc_etf0 tmc_etr0
And please confirm if ETM/ETR/ETF has been initialized or not, a simple way is to use below command:
# dmesg | grep -i coresight [ 5.390787] coresight-tmc 20070000.etr: Adding to iommu group 1 [ 5.400714] coresight etm2: CPU2: ETM v4.0 initialized [ 5.407232] coresight etm3: CPU3: ETM v4.0 initialized [ 5.412955] coresight etm4: CPU4: ETM v4.0 initialized [ 5.418689] coresight etm5: CPU5: ETM v4.0 initialized [ 5.425828] coresight etm1: CPU1: ETM v4.0 initialized [ 5.431517] coresight stm0: STM500 initialized [ 5.436390] coresight etm0: CPU0: ETM v4.0 initialized
Thanks, Leo
H MJ eric.mjh123@gmail.com 於 2020年6月10日 週三 下午3:38寫道:
Dear AI,
Big Thank for your replaying.
==> I can see "/sys/devices/cs_etm".
==> I cannot see "/sys/devices/cs_etm/sinks " # ls /sys/devices/cs_etm/ format nr_addr_filters perf_event_mux_interval_ms power subsystem type uevent
==> perf_mi10 list cs_etm cs_etm// [Kernel PMU event]
Big Thanks. BRs, Eric
Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
# ls /sys/bus/coresight/devices/
[...]
coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
Hi,
On Mon, 15 Jun 2020 at 06:37, leo.yan@linaro.org wrote:
Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
# ls /sys/bus/coresight/devices/
[...]
coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
As well as the code Leo points out, you have said you are not seeing any entries in the cs_etm/sinks directory. I would recommend debugging the code where these are setup when coresight sink / link components are registered [1], in function [2]. Check also that the 'sinks' group [3] is correctly registered @ [4].
Regards
Mike
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Dear Leo, Mike,
I found two import differences. 1. My device (phone) kernel version is 4.19.81, but above links is 5.8-rc2. 2. The second difference is my device is smart phone (Mi K30 5G).
Based on [1], I tried to compare the old version (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v4...), both of coresight source code are almost same. Based on [2], I guess the smartphone cannot support perf-coresight. because I can see the core-sight is working from dmesg, but I cannot used built-in perf to connect the coresight.
If you have any suggestions, please let me know. Thank you very much.
BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月15日 週一 下午6:59寫道:
Hi,
On Mon, 15 Jun 2020 at 06:37, leo.yan@linaro.org wrote:
Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
# ls /sys/bus/coresight/devices/
[...]
coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
As well as the code Leo points out, you have said you are not seeing any entries in the cs_etm/sinks directory. I would recommend debugging the code where these are setup when coresight sink / link components are registered [1], in function [2]. Check also that the 'sinks' group [3] is correctly registered @ [4].
Regards
Mike
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
Dears,
Excuse me, Had you seem this data? (https://community.arm.com/developer/tools-software/tools/b/tools-software-id...) Is it correct ?
Thanks, BRs,
M.H.
H MJ eric.mjh123@gmail.com 於 2020年6月22日 週一 下午3:57寫道:
Dear Leo, Mike,
I found two import differences.
- My device (phone) kernel version is 4.19.81, but above links is 5.8-rc2.
- The second difference is my device is smart phone (Mi K30 5G).
Based on [1], I tried to compare the old version (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v4...), both of coresight source code are almost same. Based on [2], I guess the smartphone cannot support perf-coresight. because I can see the core-sight is working from dmesg, but I cannot used built-in perf to connect the coresight.
If you have any suggestions, please let me know. Thank you very much.
BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月15日 週一 下午6:59寫道:
Hi,
On Mon, 15 Jun 2020 at 06:37, leo.yan@linaro.org wrote:
Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
# ls /sys/bus/coresight/devices/
[...]
coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
As well as the code Leo points out, you have said you are not seeing any entries in the cs_etm/sinks directory. I would recommend debugging the code where these are setup when coresight sink / link components are registered [1], in function [2]. Check also that the 'sinks' group [3] is correctly registered @ [4].
Regards
Mike
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
Hi,
That blog entry is nearly 3 years old and a significant amount of the information is out of date.
Regards
Mike
On Mon, 29 Jun 2020 at 14:44, H MJ eric.mjh123@gmail.com wrote:
Dears,
Excuse me, Had you seem this data? (https://community.arm.com/developer/tools-software/tools/b/tools-software-id...) Is it correct ?
Thanks, BRs,
M.H.
H MJ eric.mjh123@gmail.com 於 2020年6月22日 週一 下午3:57寫道:
Dear Leo, Mike,
I found two import differences.
- My device (phone) kernel version is 4.19.81, but above links is 5.8-rc2.
- The second difference is my device is smart phone (Mi K30 5G).
Based on [1], I tried to compare the old version (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v4...), both of coresight source code are almost same. Based on [2], I guess the smartphone cannot support perf-coresight. because I can see the core-sight is working from dmesg, but I cannot used built-in perf to connect the coresight.
If you have any suggestions, please let me know. Thank you very much.
BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月15日 週一 下午6:59寫道:
Hi,
On Mon, 15 Jun 2020 at 06:37, leo.yan@linaro.org wrote:
Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
# ls /sys/bus/coresight/devices/
[...]
coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
As well as the code Leo points out, you have said you are not seeing any entries in the cs_etm/sinks directory. I would recommend debugging the code where these are setup when coresight sink / link components are registered [1], in function [2]. Check also that the 'sinks' group [3] is correctly registered @ [4].
Regards
Mike
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
Dear Mike,
Big thanks for responding !!! These are my kernel configuration on Mi K30 5G (SDM765G).
CONFIG_DEBUG_ALIGN_RODATA=y # CONFIG_ARM64_RELOC_TEST is not set CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE=y CONFIG_CORESIGHT=y CONFIG_CORESIGHT_LINKS_AND_SINKS=y CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y # CONFIG_CORESIGHT_CATU is not set CONFIG_CORESIGHT_SINK_TPIU=y CONFIG_CORESIGHT_SINK_ETBV10=y CONFIG_CORESIGHT_SOURCE_ETM4X=y CONFIG_CORESIGHT_DYNAMIC_REPLICATOR=y # CONFIG_CORESIGHT_STM is not set # CONFIG_CORESIGHT_CPU_DEBUG is not set # CONFIG_CORESIGHT_CTI is not set # CONFIG_CORESIGHT_TPDA is not set # CONFIG_CORESIGHT_TPDM is not set CONFIG_CORESIGHT_CSR=y # CONFIG_CORESIGHT_DUMMY is not set # CONFIG_CORESIGHT_REMOTE_ETM is not set # CONFIG_CORESIGHT_TGU is not set # CONFIG_CORESIGHT_LINK_LATE_DISABLE is not set
If possible, could you give me some kernel config example that can run the perf-coresight for referencing?
Thank you very much. BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月29日 週一 下午10:22寫道:
Hi,
That blog entry is nearly 3 years old and a significant amount of the information is out of date.
Regards
Mike
On Mon, 29 Jun 2020 at 14:44, H MJ eric.mjh123@gmail.com wrote:
Dears,
Excuse me, Had you seem this data? (https://community.arm.com/developer/tools-software/tools/b/tools-software-id...) Is it correct ?
Thanks, BRs,
M.H.
H MJ eric.mjh123@gmail.com 於 2020年6月22日 週一 下午3:57寫道:
Dear Leo, Mike,
I found two import differences.
- My device (phone) kernel version is 4.19.81, but above links is 5.8-rc2.
- The second difference is my device is smart phone (Mi K30 5G).
Based on [1], I tried to compare the old version (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v4...), both of coresight source code are almost same. Based on [2], I guess the smartphone cannot support perf-coresight. because I can see the core-sight is working from dmesg, but I cannot used built-in perf to connect the coresight.
If you have any suggestions, please let me know. Thank you very much.
BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月15日 週一 下午6:59寫道:
Hi,
On Mon, 15 Jun 2020 at 06:37, leo.yan@linaro.org wrote:
Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
> # ls /sys/bus/coresight/devices/
[...]
> coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
As well as the code Leo points out, you have said you are not seeing any entries in the cs_etm/sinks directory. I would recommend debugging the code where these are setup when coresight sink / link components are registered [1], in function [2]. Check also that the 'sinks' group [3] is correctly registered @ [4].
Regards
Mike
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
Dears,
After I moved some kernel codes from Linux version 5.8 into 4.19 (current device), I can see the device name in the sinks folder. (Table1) However, both of perfK30 (perf builtin version) and perf53 (perf linux 53 version) still happened same problems. (Table 2)
Could you give me some suggestions?
Thanks you very much!!!!!!!
BRs, M.H.
------------------------------------------------------------------------------------------------------------------------------------------------ --------------------------------- Table 1 - START -------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------
=====/sys/bus/coresight/devices coresight-audio-etm0 coresight-csr coresight-cti-apss_cti0 coresight-cti-apss_cti1 coresight-cti-apss_cti2 coresight-cti-cpu0 coresight-cti-cpu1 coresight-cti-cpu2 coresight-cti-cpu3 coresight-cti-cpu4 coresight-cti-cpu5 coresight-cti-cpu6 coresight-cti-cpu7 coresight-cti-ddr_dl_0_cti_0 coresight-cti-ddr_dl_0_cti_1 coresight-cti-ddr_dl_0_cti_2 coresight-cti-ddr_dl_1_cti_0 coresight-cti-ddr_dl_1_cti_1 coresight-cti-ddr_dl_1_cti_2 coresight-cti-dlcompute_cti0 coresight-cti-dlct_cti0 coresight-cti-dlct_cti1 coresight-cti-dlct_cti2 coresight-cti-dlmm_cti0 coresight-cti-dlmm_cti1 coresight-cti-iris_dl_cti coresight-cti-lpass_dl_cti coresight-cti-npu_dl_cti_0 coresight-cti-npu_dl_cti_1 coresight-cti-npu_q6_cti coresight-cti-swao_cti0 coresight-cti-swao_cti1 coresight-cti-swao_cti2 coresight-cti-swao_cti3 coresight-cti-turing_dl_cti coresight-cti-turing_q6_cti coresight-cti0 coresight-cti1 coresight-cti10 coresight-cti11 coresight-cti12 coresight-cti13 coresight-cti14 coresight-cti15 coresight-cti2 coresight-cti3 coresight-cti4 coresight-cti5 coresight-cti6 coresight-cti7 coresight-cti8 coresight-cti9 coresight-etm0 coresight-etm1 coresight-etm2 coresight-etm3 coresight-etm4 coresight-etm5 coresight-etm6 coresight-etm7 coresight-eud coresight-modem-diag coresight-modem-etm0 coresight-modem2-etm0 coresight-npu-etm0 coresight-replicator-qdss coresight-replicator-swao coresight-stm coresight-swao-csr coresight-tgu-ipcb coresight-tmc-etf coresight-tmc-etr coresight-tpda coresight-tpda-apss coresight-tpda-llm-gold coresight-tpda-llm-silver coresight-tpda-modem coresight-tpda-nav coresight-tpda-olc coresight-tpda-swao coresight-tpdm-apss coresight-tpdm-ddr coresight-tpdm-dl-compute0 coresight-tpdm-dl-compute1 coresight-tpdm-dlct coresight-tpdm-ipcc coresight-tpdm-llm-gold coresight-tpdm-llm-silver coresight-tpdm-lpass coresight-tpdm-lpass-lpi coresight-tpdm-mdss coresight-tpdm-mm coresight-tpdm-modem-0 coresight-tpdm-nav coresight-tpdm-npu coresight-tpdm-olc coresight-tpdm-pimem coresight-tpdm-prng coresight-tpdm-qm coresight-tpdm-swao-0 coresight-tpdm-swao-1 coresight-tpdm-turing coresight-tpdm-turing-llm coresight-tpdm-vsense coresight-tpdm-wcss coresight-turing-etm0
=====/sys/bus/event_source/devices/cs_etm/ cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 format nr_addr_filters perf_event_mux_interval_ms power sinks subsystem type uevent
=====/sys/bus/event_source/devices/cs_etm/sinks/ coresight-eud coresight-tmc-etf coresight-tmc-etr
------------------------------------------------------------------------------------------------------------------------------------------------ --------------------------------- Table 1 - END -------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------ --------------------------------- Table 2 - START -------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------
### command type-1 perf record -e cs_etm/coresight-tmc-etf/ perf record -e cs_etm/@coresight-tmc-etf/ perf record -e cs_etm/coresight-tmc-etr/ perf record -e cs_etm/@coresight-tmc-etr/
perf record -e cs_etm/tmc-etf/ perf record -e cs_etm/@tmc-etf/ perf record -e cs_etm/tmc-etr/ perf record -e cs_etm/@tmc-etr/
perf record -e cs_etm/tmc-etf0/ perf record -e cs_etm/@tmc-etf0/ perf record -e cs_etm/tmc-etr0/ perf record -e cs_etm/@tmc-etr0/
perf record -e cs_etm/etf0/ perf record -e cs_etm/etr0/
event syntax error: 'cs_etm/@coresight-tmc-etf/' ___ parser error
event syntax error: 'cs_etm/coresight-tmc-etf/' ___ unknown term 'coresight-tmc-etf' for pmu 'cs_etm'
### command type-2 perf record -e cs_etm/@etf/ ls perf record -e cs_etm/@etf0/ ls perf record -e cs_etm/@etr/ ls perf record -e cs_etm/@etr0/ ls
failed to set sink "etf0" on event cs_etm/@etf0/ with 2 (No such file or directory)
------------------------------------------------------------------------------------------------------------------------------------------------ --------------------------------- Table 2 - END -------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------
H MJ eric.mjh123@gmail.com 於 2020年6月30日 週二 下午6:10寫道:
Dear Mike,
Big thanks for responding !!! These are my kernel configuration on Mi K30 5G (SDM765G).
CONFIG_DEBUG_ALIGN_RODATA=y # CONFIG_ARM64_RELOC_TEST is not set CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE=y CONFIG_CORESIGHT=y CONFIG_CORESIGHT_LINKS_AND_SINKS=y CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y # CONFIG_CORESIGHT_CATU is not set CONFIG_CORESIGHT_SINK_TPIU=y CONFIG_CORESIGHT_SINK_ETBV10=y CONFIG_CORESIGHT_SOURCE_ETM4X=y CONFIG_CORESIGHT_DYNAMIC_REPLICATOR=y # CONFIG_CORESIGHT_STM is not set # CONFIG_CORESIGHT_CPU_DEBUG is not set # CONFIG_CORESIGHT_CTI is not set # CONFIG_CORESIGHT_TPDA is not set # CONFIG_CORESIGHT_TPDM is not set CONFIG_CORESIGHT_CSR=y # CONFIG_CORESIGHT_DUMMY is not set # CONFIG_CORESIGHT_REMOTE_ETM is not set # CONFIG_CORESIGHT_TGU is not set # CONFIG_CORESIGHT_LINK_LATE_DISABLE is not set
If possible, could you give me some kernel config example that can run the perf-coresight for referencing?
Thank you very much. BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月29日 週一 下午10:22寫道:
Hi,
That blog entry is nearly 3 years old and a significant amount of the information is out of date.
Regards
Mike
On Mon, 29 Jun 2020 at 14:44, H MJ eric.mjh123@gmail.com wrote:
Dears,
Excuse me, Had you seem this data? (https://community.arm.com/developer/tools-software/tools/b/tools-software-id...) Is it correct ?
Thanks, BRs,
M.H.
H MJ eric.mjh123@gmail.com 於 2020年6月22日 週一 下午3:57寫道:
Dear Leo, Mike,
I found two import differences.
- My device (phone) kernel version is 4.19.81, but above links is 5.8-rc2.
- The second difference is my device is smart phone (Mi K30 5G).
Based on [1], I tried to compare the old version (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v4...), both of coresight source code are almost same. Based on [2], I guess the smartphone cannot support perf-coresight. because I can see the core-sight is working from dmesg, but I cannot used built-in perf to connect the coresight.
If you have any suggestions, please let me know. Thank you very much.
BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月15日 週一 下午6:59寫道:
Hi,
On Mon, 15 Jun 2020 at 06:37, leo.yan@linaro.org wrote:
Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
> > # ls /sys/bus/coresight/devices/
[...]
> > coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
As well as the code Leo points out, you have said you are not seeing any entries in the cs_etm/sinks directory. I would recommend debugging the code where these are setup when coresight sink / link components are registered [1], in function [2]. Check also that the 'sinks' group [3] is correctly registered @ [4].
Regards
Mike
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
Dears,
I guessed this error is caused by the perf-parser cannot support the format "x-x-x". (not _ ) Is it possible to solve by modifying the parser?
Thanks, BRs, Meng-Ju
H MJ eric.mjh123@gmail.com 於 2020年7月1日 週三 上午10:41寫道:
Dears,
After I moved some kernel codes from Linux version 5.8 into 4.19 (current device), I can see the device name in the sinks folder. (Table1) However, both of perfK30 (perf builtin version) and perf53 (perf linux 53 version) still happened same problems. (Table 2)
Could you give me some suggestions?
Thanks you very much!!!!!!!
BRs, M.H.
--------------------------------- Table 1 - START
=====/sys/bus/coresight/devices coresight-audio-etm0 coresight-csr coresight-cti-apss_cti0 coresight-cti-apss_cti1 coresight-cti-apss_cti2 coresight-cti-cpu0 coresight-cti-cpu1 coresight-cti-cpu2 coresight-cti-cpu3 coresight-cti-cpu4 coresight-cti-cpu5 coresight-cti-cpu6 coresight-cti-cpu7 coresight-cti-ddr_dl_0_cti_0 coresight-cti-ddr_dl_0_cti_1 coresight-cti-ddr_dl_0_cti_2 coresight-cti-ddr_dl_1_cti_0 coresight-cti-ddr_dl_1_cti_1 coresight-cti-ddr_dl_1_cti_2 coresight-cti-dlcompute_cti0 coresight-cti-dlct_cti0 coresight-cti-dlct_cti1 coresight-cti-dlct_cti2 coresight-cti-dlmm_cti0 coresight-cti-dlmm_cti1 coresight-cti-iris_dl_cti coresight-cti-lpass_dl_cti coresight-cti-npu_dl_cti_0 coresight-cti-npu_dl_cti_1 coresight-cti-npu_q6_cti coresight-cti-swao_cti0 coresight-cti-swao_cti1 coresight-cti-swao_cti2 coresight-cti-swao_cti3 coresight-cti-turing_dl_cti coresight-cti-turing_q6_cti coresight-cti0 coresight-cti1 coresight-cti10 coresight-cti11 coresight-cti12 coresight-cti13 coresight-cti14 coresight-cti15 coresight-cti2 coresight-cti3 coresight-cti4 coresight-cti5 coresight-cti6 coresight-cti7 coresight-cti8 coresight-cti9 coresight-etm0 coresight-etm1 coresight-etm2 coresight-etm3 coresight-etm4 coresight-etm5 coresight-etm6 coresight-etm7 coresight-eud coresight-modem-diag coresight-modem-etm0 coresight-modem2-etm0 coresight-npu-etm0 coresight-replicator-qdss coresight-replicator-swao coresight-stm coresight-swao-csr coresight-tgu-ipcb coresight-tmc-etf coresight-tmc-etr coresight-tpda coresight-tpda-apss coresight-tpda-llm-gold coresight-tpda-llm-silver coresight-tpda-modem coresight-tpda-nav coresight-tpda-olc coresight-tpda-swao coresight-tpdm-apss coresight-tpdm-ddr coresight-tpdm-dl-compute0 coresight-tpdm-dl-compute1 coresight-tpdm-dlct coresight-tpdm-ipcc coresight-tpdm-llm-gold coresight-tpdm-llm-silver coresight-tpdm-lpass coresight-tpdm-lpass-lpi coresight-tpdm-mdss coresight-tpdm-mm coresight-tpdm-modem-0 coresight-tpdm-nav coresight-tpdm-npu coresight-tpdm-olc coresight-tpdm-pimem coresight-tpdm-prng coresight-tpdm-qm coresight-tpdm-swao-0 coresight-tpdm-swao-1 coresight-tpdm-turing coresight-tpdm-turing-llm coresight-tpdm-vsense coresight-tpdm-wcss coresight-turing-etm0
=====/sys/bus/event_source/devices/cs_etm/ cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 format nr_addr_filters perf_event_mux_interval_ms power sinks subsystem type uevent
=====/sys/bus/event_source/devices/cs_etm/sinks/ coresight-eud coresight-tmc-etf coresight-tmc-etr
--------------------------------- Table 1 - END
--------------------------------- Table 2 - START
### command type-1 perf record -e cs_etm/coresight-tmc-etf/ perf record -e cs_etm/@coresight-tmc-etf/ perf record -e cs_etm/coresight-tmc-etr/ perf record -e cs_etm/@coresight-tmc-etr/
perf record -e cs_etm/tmc-etf/ perf record -e cs_etm/@tmc-etf/ perf record -e cs_etm/tmc-etr/ perf record -e cs_etm/@tmc-etr/
perf record -e cs_etm/tmc-etf0/ perf record -e cs_etm/@tmc-etf0/ perf record -e cs_etm/tmc-etr0/ perf record -e cs_etm/@tmc-etr0/
perf record -e cs_etm/etf0/ perf record -e cs_etm/etr0/
event syntax error: 'cs_etm/@coresight-tmc-etf/' ___ parser error
event syntax error: 'cs_etm/coresight-tmc-etf/' ___ unknown term 'coresight-tmc-etf' for pmu 'cs_etm'
### command type-2 perf record -e cs_etm/@etf/ ls perf record -e cs_etm/@etf0/ ls perf record -e cs_etm/@etr/ ls perf record -e cs_etm/@etr0/ ls
failed to set sink "etf0" on event cs_etm/@etf0/ with 2 (No such file or directory)
--------------------------------- Table 2 - END
H MJ eric.mjh123@gmail.com 於 2020年6月30日 週二 下午6:10寫道:
Dear Mike,
Big thanks for responding !!! These are my kernel configuration on Mi K30 5G (SDM765G).
CONFIG_DEBUG_ALIGN_RODATA=y # CONFIG_ARM64_RELOC_TEST is not set CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE=y CONFIG_CORESIGHT=y CONFIG_CORESIGHT_LINKS_AND_SINKS=y CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y # CONFIG_CORESIGHT_CATU is not set CONFIG_CORESIGHT_SINK_TPIU=y CONFIG_CORESIGHT_SINK_ETBV10=y CONFIG_CORESIGHT_SOURCE_ETM4X=y CONFIG_CORESIGHT_DYNAMIC_REPLICATOR=y # CONFIG_CORESIGHT_STM is not set # CONFIG_CORESIGHT_CPU_DEBUG is not set # CONFIG_CORESIGHT_CTI is not set # CONFIG_CORESIGHT_TPDA is not set # CONFIG_CORESIGHT_TPDM is not set CONFIG_CORESIGHT_CSR=y # CONFIG_CORESIGHT_DUMMY is not set # CONFIG_CORESIGHT_REMOTE_ETM is not set # CONFIG_CORESIGHT_TGU is not set # CONFIG_CORESIGHT_LINK_LATE_DISABLE is not set
If possible, could you give me some kernel config example that can run the perf-coresight for referencing?
Thank you very much. BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月29日 週一 下午10:22寫道:
Hi,
That blog entry is nearly 3 years old and a significant amount of the information is out of date.
Regards
Mike
On Mon, 29 Jun 2020 at 14:44, H MJ eric.mjh123@gmail.com wrote:
Dears,
Excuse me, Had you seem this data? (https://community.arm.com/developer/tools-software/tools/b/tools-software-id...) Is it correct ?
Thanks, BRs,
M.H.
H MJ eric.mjh123@gmail.com 於 2020年6月22日 週一 下午3:57寫道:
Dear Leo, Mike,
I found two import differences.
- My device (phone) kernel version is 4.19.81, but above links is 5.8-rc2.
- The second difference is my device is smart phone (Mi K30 5G).
Based on [1], I tried to compare the old version (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v4...), both of coresight source code are almost same. Based on [2], I guess the smartphone cannot support perf-coresight. because I can see the core-sight is working from dmesg, but I cannot used built-in perf to connect the coresight.
If you have any suggestions, please let me know. Thank you very much.
BRs, M.H.
Mike Leach mike.leach@linaro.org 於 2020年6月15日 週一 下午6:59寫道:
Hi,
On Mon, 15 Jun 2020 at 06:37, leo.yan@linaro.org wrote: > > Hi Eric, > > On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote: > > > > # ls /sys/bus/coresight/devices/ > > [...] > > > > coresight-funnel-dl-center coresight-tmc-etr > > To be honest, I am a bit confused why the CoreSight device names have > prefix 'coresight-', on my side, three platforms > (Juno-r2/DB410c/Hikey620) don't output the device name with this > format. On the other hand, the device name will be used the establish > the hardware connection path from CoreSight source (e.g. etm) to sink > (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight > device naming has unexpected prefix 'coresight-' (and this might > relevant with your current issue if it fails to find correct sink > device). > > Another way to move forward to dig into code (e.g. using printk) in the > function etm_setup_aux() [1], one possibility is CoreSight perf drive > fails to find corresponding, so at the line 299 in coresight-etm-perf.c > (in function etm_setup_aux()) the pointer '*sink' is NULL and directly > bail out. The failure might be caused by mismatching between user space > passing sink name and in drive it fails to find corresponding sink > device. >
As well as the code Leo points out, you have said you are not seeing any entries in the cs_etm/sinks directory. I would recommend debugging the code where these are setup when coresight sink / link components are registered [1], in function [2]. Check also that the 'sinks' group [3] is correctly registered @ [4].
Regards
Mike
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...
> Thanks, > Leo > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv... > _______________________________________________ > CoreSight mailing list > CoreSight@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
Hi Eric,
On Wed, Jul 01, 2020 at 10:41:21AM +0800, H MJ wrote:
Dears,
After I moved some kernel codes from Linux version 5.8 into 4.19 (current device), I can see the device name in the sinks folder. (Table1) However, both of perfK30 (perf builtin version) and perf53 (perf linux 53 version) still happened same problems. (Table 2)
Could you give me some suggestions?
I am busy on the tasks in hand, so didn't follow up your questions closely.
When I saw you are using different code bases for kernel and perf tool, this seems to me it is not the right way. I suggest you could firstly to use the same code base for both kernel and perf tool, e.g. you can use the mainline kernel, or if you have SoC vendor's kernel version, either is okay.
The kernel and perf tool have many upgradation from 4.19 to 5.8, especially for perf tools, if you want to back port some patches from 5.8 to 4.19, it's easily to miss some code pices and cause compatibility issue. If jump to differnt code base, the questions will be floating.
Again, I still suggest you could firstly get clear the CoreSight device naming issue, e.g. why the device names are not using default namings, like tmc-etr0, tmc-etf0, etc? Could you check this and also check with SoC vendor if possible?
And as Mike and me have suggested some code pieces for perf tool and driver, suggest you could dig into it and get more debugging info.
Thanks, Leo
Dear Leo,
Big Thanks for replying!!!!
I have tried some code pieces for perf tool and driver (kernel v4.19), but it seems cannot work because the parser error.
Also, I've checked the coresight can work by referencing https://github.com/saiprakash-ranjan/coresight-test-results/blob/master/core....
Therefore, I guess the key problem is that the perf-parser cannot support the symbol "-" under the cs_etm. Now, I am trying two ways, one is to modify the device name under the folders (/sys/bus/coresight/device, /sys/bus/event_source/devices/cs_etm/sinks/) another one is to modify the per-parser rule to solve the problem.
Could you give me some suggestions?
Thanks you very much. Best regards, M.H.
Leo Yan leo.yan@linaro.org 於 2020年7月2日 週四 下午4:25寫道:
Hi Eric,
On Wed, Jul 01, 2020 at 10:41:21AM +0800, H MJ wrote:
Dears,
After I moved some kernel codes from Linux version 5.8 into 4.19 (current device), I can see the device name in the sinks folder. (Table1) However, both of perfK30 (perf builtin version) and perf53 (perf linux 53 version) still happened same problems. (Table 2)
Could you give me some suggestions?
I am busy on the tasks in hand, so didn't follow up your questions closely.
When I saw you are using different code bases for kernel and perf tool, this seems to me it is not the right way. I suggest you could firstly to use the same code base for both kernel and perf tool, e.g. you can use the mainline kernel, or if you have SoC vendor's kernel version, either is okay.
The kernel and perf tool have many upgradation from 4.19 to 5.8, especially for perf tools, if you want to back port some patches from 5.8 to 4.19, it's easily to miss some code pices and cause compatibility issue. If jump to differnt code base, the questions will be floating.
Again, I still suggest you could firstly get clear the CoreSight device naming issue, e.g. why the device names are not using default namings, like tmc-etr0, tmc-etf0, etc? Could you check this and also check with SoC vendor if possible?
And as Mike and me have suggested some code pieces for perf tool and driver, suggest you could dig into it and get more debugging info.
Thanks, Leo
Hi,
On Thu, 2 Jul 2020 at 09:59, H MJ eric.mjh123@gmail.com wrote:
Dear Leo,
Big Thanks for replying!!!!
I have tried some code pieces for perf tool and driver (kernel v4.19), but it seems cannot work because the parser error.
Also, I've checked the coresight can work by referencing https://github.com/saiprakash-ranjan/coresight-test-results/blob/master/core....
Therefore, I guess the key problem is that the perf-parser cannot support the symbol "-" under the cs_etm. Now, I am trying two ways, one is to modify the device name under the folders (/sys/bus/coresight/device, /sys/bus/event_source/devices/cs_etm/sinks/)
This is the best approach.
another one is to modify the per-parser rule to solve the problem.
The perf parser is rather complex - the "-" may be causing an error due to it being valid for other commands .e.g. -e, so changing the parser may not be possible.
Could you give me some suggestions?
Due to the way perf works, the sinks/<name> contains a value known as the sinkid - this is a string hash of <name>. This 32 bit hash is what is passed between kernel and user space perf, not the string. As a result the following is possible (from my DB410 system):-
root@linaro-developer:/home/linaro/perf-tests# ls /sys/devices/cs_etm/sinks/ tmc_etf0 tmc_etr0 tpiu0 root@linaro-developer:/home/linaro/perf-tests# cat /sys/devices/cs_etm/sinks/tmc_etr0 0xa6509eae root@linaro-developer:/home/linaro/perf-tests# ./perf record -e cs_etm/sinkid=0xa6509eae/ --per-thread uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.157 MB perf.data ]
Regards
Mike
Thanks you very much. Best regards, M.H.
Leo Yan leo.yan@linaro.org 於 2020年7月2日 週四 下午4:25寫道:
Hi Eric,
On Wed, Jul 01, 2020 at 10:41:21AM +0800, H MJ wrote:
Dears,
After I moved some kernel codes from Linux version 5.8 into 4.19 (current device), I can see the device name in the sinks folder. (Table1) However, both of perfK30 (perf builtin version) and perf53 (perf linux 53 version) still happened same problems. (Table 2)
Could you give me some suggestions?
I am busy on the tasks in hand, so didn't follow up your questions closely.
When I saw you are using different code bases for kernel and perf tool, this seems to me it is not the right way. I suggest you could firstly to use the same code base for both kernel and perf tool, e.g. you can use the mainline kernel, or if you have SoC vendor's kernel version, either is okay.
The kernel and perf tool have many upgradation from 4.19 to 5.8, especially for perf tools, if you want to back port some patches from 5.8 to 4.19, it's easily to miss some code pices and cause compatibility issue. If jump to differnt code base, the questions will be floating.
Again, I still suggest you could firstly get clear the CoreSight device naming issue, e.g. why the device names are not using default namings, like tmc-etr0, tmc-etf0, etc? Could you check this and also check with SoC vendor if possible?
And as Mike and me have suggested some code pieces for perf tool and driver, suggest you could dig into it and get more debugging info.
Thanks, Leo
On Thu, Jul 02, 2020 at 11:39:34AM +0100, Mike Leach wrote:
[...]
Due to the way perf works, the sinks/<name> contains a value known as the sinkid - this is a string hash of <name>. This 32 bit hash is what is passed between kernel and user space perf, not the string. As a result the following is possible (from my DB410 system):-
root@linaro-developer:/home/linaro/perf-tests# ls /sys/devices/cs_etm/sinks/ tmc_etf0 tmc_etr0 tpiu0 root@linaro-developer:/home/linaro/perf-tests# cat /sys/devices/cs_etm/sinks/tmc_etr0 0xa6509eae root@linaro-developer:/home/linaro/perf-tests# ./perf record -e cs_etm/sinkid=0xa6509eae/ --per-thread uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.157 MB perf.data ]
Just follow up Mike's suggestion, you could apply below change to dump more info for source and sink connections. This would be a good start point to verify your suspected issues.
---8<---
diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c index 84f1dcb69827..935c75a9ad4b 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -226,6 +226,8 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, sink = coresight_get_enabled_sink(true); }
+ printk("%s: specified sink name %s\n", __func__, dev_name(&sink->dev)); + if (!sink) goto err;
@@ -253,6 +255,9 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, continue; }
+ printk("%s: create path %s->%s\n", __func__, + dev_name(&csdev->dev), dev_name(&sink->dev)); + /* * Building a path doesn't enable it, it simply builds a * list of devices from source to sink that can be
I can see the kernel logs:
root@debian:~# perf record -e cs_etm/@tmc_etr0/ --per-thread uname [ 284.320559] etm_setup_aux: specified sink name tmc_etr0 [ 284.325815] etm_setup_aux: create path etm0->tmc_etr0 [ 284.330927] etm_setup_aux: create path etm1->tmc_etr0 [ 284.336006] etm_setup_aux: create path etm2->tmc_etr0 [ 284.341083] etm_setup_aux: create path etm3->tmc_etr0 [ 284.346158] etm_setup_aux: create path etm4->tmc_etr0 [ 284.351233] etm_setup_aux: create path etm5->tmc_etr0
Thanks, Leo