linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] perf test: Update cs_etm testcase for Arm ETE
       [not found] <20230911065541.91293-1-tianruidong@linux.alibaba.com>
@ 2023-09-11  8:51 ` James Clark
  2023-09-12 19:37   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: James Clark @ 2023-09-11  8:51 UTC (permalink / raw)
  To: Ruidong Tian
  Cc: coresight, mike.leach, alexander.shishkin, linux-arm-kernel,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	acme@kernel.org



On 11/09/2023 07:55, Ruidong Tian wrote:
> Add ETE as one of the supported device types in perf cs_etm testcase.
> 
> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
> ---
>  tools/perf/tests/shell/test_arm_coresight.sh | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh
> index f1bf5621160f..fe78c4626e45 100755
> --- a/tools/perf/tests/shell/test_arm_coresight.sh
> +++ b/tools/perf/tests/shell/test_arm_coresight.sh
> @@ -11,6 +11,19 @@
>  
>  glb_err=0
>  
> +cs_etm_dev_name() {
> +	cs_etm_path=$(find  /sys/bus/event_source/devices/cs_etm/ -name cpu* -print -quit)
> +	trcdevarch=$(cat ${cs_etm_path}/mgmt/trcdevarch)
> +	archhver=$((($trcdevarch >> 12) & 0xf))
> +	archpart=$(($trcdevarch & 0xfff))
> +
> +	if [ $archhver -eq 5 -a "$(printf "0x%X\n" $archpart)" = "0xA13" ] ; then
> +		echo "ete"
> +	else
> +		echo "etm"
> +	fi
> +}
> +
>  skip_if_no_cs_etm_event() {
>  	perf list | grep -q 'cs_etm//' && return 0
>  
> @@ -136,7 +149,7 @@ arm_cs_iterate_devices() {
>  
>  arm_cs_etm_traverse_path_test() {
>  	# Iterate for every ETM device
> -	for dev in /sys/bus/coresight/devices/etm*; do
> +	for dev in /sys/bus/coresight/devices/$(cs_etm_dev_name)*; do
>  
>  		# Find the ETM device belonging to which CPU
>  		cpu=`cat $dev/cpu`

Reviewed-by: James Clark <james.clark@arm.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf test: Update cs_etm testcase for Arm ETE
  2023-09-11  8:51 ` [PATCH] perf test: Update cs_etm testcase for Arm ETE James Clark
@ 2023-09-12 19:37   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-09-12 19:37 UTC (permalink / raw)
  To: James Clark
  Cc: Ruidong Tian, coresight, mike.leach, alexander.shishkin,
	linux-arm-kernel, linux-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org

Em Mon, Sep 11, 2023 at 09:51:09AM +0100, James Clark escreveu:
> On 11/09/2023 07:55, Ruidong Tian wrote:
> >  	# Iterate for every ETM device
> > -	for dev in /sys/bus/coresight/devices/etm*; do
> > +	for dev in /sys/bus/coresight/devices/$(cs_etm_dev_name)*; do
> >  
> >  		# Find the ETM device belonging to which CPU
> >  		cpu=`cat $dev/cpu`
> 
> Reviewed-by: James Clark <james.clark@arm.com>

Thanks, applied.

- Arnaldo


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-12 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230911065541.91293-1-tianruidong@linux.alibaba.com>
2023-09-11  8:51 ` [PATCH] perf test: Update cs_etm testcase for Arm ETE James Clark
2023-09-12 19:37   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).