From nobody Thu Dec 18 08:18:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19946EE57DF for ; Mon, 11 Sep 2023 06:55:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232314AbjIKGzz (ORCPT ); Mon, 11 Sep 2023 02:55:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjIKGzy (ORCPT ); Mon, 11 Sep 2023 02:55:54 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 786CB131 for ; Sun, 10 Sep 2023 23:55:49 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=tianruidong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VrmdUvU_1694415344; Received: from localhost(mailfrom:tianruidong@linux.alibaba.com fp:SMTPD_---0VrmdUvU_1694415344) by smtp.aliyun-inc.com; Mon, 11 Sep 2023 14:55:46 +0800 From: Ruidong Tian To: linux-kernel@vger.kernel.org Cc: coresight@lists.linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, alexander.shishkin@linux.intel.com, linux-arm-kernel@lists.infradead.org, Ruidong Tian Subject: [PATCH] perf test: Update cs_etm testcase for Arm ETE Date: Mon, 11 Sep 2023 14:55:41 +0800 Message-Id: <20230911065541.91293-1-tianruidong@linux.alibaba.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add ETE as one of the supported device types in perf cs_etm testcase. Signed-off-by: Ruidong Tian Reviewed-by: James Clark --- 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/test= s/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 @@ =20 glb_err=3D0 =20 +cs_etm_dev_name() { + cs_etm_path=3D$(find /sys/bus/event_source/devices/cs_etm/ -name cpu* -p= rint -quit) + trcdevarch=3D$(cat ${cs_etm_path}/mgmt/trcdevarch) + archhver=3D$((($trcdevarch >> 12) & 0xf)) + archpart=3D$(($trcdevarch & 0xfff)) + + if [ $archhver -eq 5 -a "$(printf "0x%X\n" $archpart)" =3D "0xA13" ] ; th= en + echo "ete" + else + echo "etm" + fi +} + skip_if_no_cs_etm_event() { perf list | grep -q 'cs_etm//' && return 0 =20 @@ -136,7 +149,7 @@ arm_cs_iterate_devices() { =20 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 =20 # Find the ETM device belonging to which CPU cpu=3D`cat $dev/cpu` --=20 2.33.1