lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <446ec4c1-e97f-a5a1-9830-693dd7eec52d@arm.com>
Date:   Mon, 11 Sep 2023 09:51:09 +0100
From:   James Clark <james.clark@....com>
To:     Ruidong Tian <tianruidong@...ux.alibaba.com>
Cc:     coresight@...ts.linaro.org, mike.leach@...aro.org,
        alexander.shishkin@...ux.intel.com,
        linux-arm-kernel@...ts.infradead.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
        "acme@...nel.org" <acme@...nel.org>
Subject: Re: [PATCH] perf test: Update cs_etm testcase for Arm ETE



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@...ux.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@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ