Hi all,
My colleague Junhao He noticed this issue when tracing CPU48 on Kunpeng920 platform, log as follows:
[root@localhost ~]# perf record -e cs_etm/@sink_smb1/ -C 48 -o perf.data taskset -c 48 uname -a [root@localhost ~]# perf report -D --stdio -i perf.data > perf_48.log 0x270 [0xc8]: failed to process type: 70 [Invalid argument] Error: failed to process sample [root@localhost ~]# perf -v perf version 5.17.rc4.gdeea22e4af29 [root@localhost ~]# ldd /usr/bin/perf | grep opencsd libopencsd_c_api.so.1 => /root/lib/libopencsd_c_api.so.1 libopencsd.so.1 => /root/lib/libopencsd.so.1
As (CORESIGHT_ETM_PMU_SEED + (cpu * 2)) is used in coresight_get_trace_id() to cacualate trace_id, if there are more than 48 CPUs on chip, we will have some ETM device which trace id is invalid(trace_id = 0 or trace_id > 0x6F). In this situation, we cannot parse trace data using perf tool.
Perhaps we should make trace_id in the range of 1 to 0x6F in coresight_get_trace_id()? But there also might be parsing problem if duplicate trace ID is used during collection.
Any response will be highly appreciated.
Thanks, Qi
Hi
On Mon, 16 May 2022 at 04:51, liuqi (BA) liuqi115@huawei.com wrote:
Hi all,
My colleague Junhao He noticed this issue when tracing CPU48 on Kunpeng920 platform, log as follows:
[root@localhost ~]# perf record -e cs_etm/@sink_smb1/ -C 48 -o perf.data taskset -c 48 uname -a [root@localhost ~]# perf report -D --stdio -i perf.data > perf_48.log 0x270 [0xc8]: failed to process type: 70 [Invalid argument] Error: failed to process sample [root@localhost ~]# perf -v perf version 5.17.rc4.gdeea22e4af29 [root@localhost ~]# ldd /usr/bin/perf | grep opencsd libopencsd_c_api.so.1 => /root/lib/libopencsd_c_api.so.1 libopencsd.so.1 => /root/lib/libopencsd.so.1
As (CORESIGHT_ETM_PMU_SEED + (cpu * 2)) is used in coresight_get_trace_id() to cacualate trace_id, if there are more than 48 CPUs on chip, we will have some ETM device which trace id is invalid(trace_id = 0 or trace_id > 0x6F). In this situation, we cannot parse trace data using perf tool.
Perhaps we should make trace_id in the range of 1 to 0x6F in coresight_get_trace_id()? But there also might be parsing problem if duplicate trace ID is used during collection.
Any response will be highly appreciated.
Thanks, Qi
Addressed by patchset here:
[PATCH 00/10] coresight: Add new API to allocate trace source ID values https://lists.linaro.org/archives/list/coresight@lists.linaro.org/thread/BJE...
Version 2 of this patchset is to be published in due course.
Regards
Mike
Hi Mike,
On 2022/5/16 20:23, Mike Leach wrote:
Hi
On Mon, 16 May 2022 at 04:51, liuqi (BA) liuqi115@huawei.com wrote:
Hi all,
My colleague Junhao He noticed this issue when tracing CPU48 on Kunpeng920 platform, log as follows:
[root@localhost ~]# perf record -e cs_etm/@sink_smb1/ -C 48 -o perf.data taskset -c 48 uname -a [root@localhost ~]# perf report -D --stdio -i perf.data > perf_48.log 0x270 [0xc8]: failed to process type: 70 [Invalid argument] Error: failed to process sample [root@localhost ~]# perf -v perf version 5.17.rc4.gdeea22e4af29 [root@localhost ~]# ldd /usr/bin/perf | grep opencsd libopencsd_c_api.so.1 => /root/lib/libopencsd_c_api.so.1 libopencsd.so.1 => /root/lib/libopencsd.so.1
As (CORESIGHT_ETM_PMU_SEED + (cpu * 2)) is used in coresight_get_trace_id() to cacualate trace_id, if there are more than 48 CPUs on chip, we will have some ETM device which trace id is invalid(trace_id = 0 or trace_id > 0x6F). In this situation, we cannot parse trace data using perf tool.
Perhaps we should make trace_id in the range of 1 to 0x6F in coresight_get_trace_id()? But there also might be parsing problem if duplicate trace ID is used during collection.
Any response will be highly appreciated.
Thanks, Qi
Addressed by patchset here:
[PATCH 00/10] coresight: Add new API to allocate trace source ID values https://lists.linaro.org/archives/list/coresight@lists.linaro.org/thread/BJE...
Version 2 of this patchset is to be published in due course.
got it, I'll have a look at this series, thanks!
Regards, Qi
Regards
Mike