* [ISSUE] trace_id of ETM will be invalid when there are more than 48 CPUs on chip
@ 2022-05-16 3:51 liuqi (BA)
2022-05-16 12:23 ` Mike Leach
0 siblings, 1 reply; 3+ messages in thread
From: liuqi (BA) @ 2022-05-16 3:51 UTC (permalink / raw)
To: Mathieu Poirier, Suzuki K Poulose, mike.leach, Leo Yan
Cc: coresight, linux-arm-kernel, Linuxarm, hejunhao3
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ISSUE] trace_id of ETM will be invalid when there are more than 48 CPUs on chip
2022-05-16 3:51 [ISSUE] trace_id of ETM will be invalid when there are more than 48 CPUs on chip liuqi (BA)
@ 2022-05-16 12:23 ` Mike Leach
2022-05-17 3:52 ` liuqi (BA)
0 siblings, 1 reply; 3+ messages in thread
From: Mike Leach @ 2022-05-16 12:23 UTC (permalink / raw)
To: liuqi (BA)
Cc: Mathieu Poirier, Suzuki K Poulose, Leo Yan, coresight,
linux-arm-kernel, Linuxarm, hejunhao3
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/BJEO7KMX723YZWVTPWAY7F3GWSVTO644/
Version 2 of this patchset is to be published in due course.
Regards
Mike
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ISSUE] trace_id of ETM will be invalid when there are more than 48 CPUs on chip
2022-05-16 12:23 ` Mike Leach
@ 2022-05-17 3:52 ` liuqi (BA)
0 siblings, 0 replies; 3+ messages in thread
From: liuqi (BA) @ 2022-05-17 3:52 UTC (permalink / raw)
To: Mike Leach
Cc: Mathieu Poirier, Suzuki K Poulose, Leo Yan, coresight,
linux-arm-kernel, Linuxarm, hejunhao3
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/BJEO7KMX723YZWVTPWAY7F3GWSVTO644/
>
> 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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-17 3:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 3:51 [ISSUE] trace_id of ETM will be invalid when there are more than 48 CPUs on chip liuqi (BA)
2022-05-16 12:23 ` Mike Leach
2022-05-17 3:52 ` liuqi (BA)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.