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