Skip to content

Commit bb35084

Browse files
Ruidong Tianacmel
authored andcommitted
perf test: Update cs_etm testcase for Arm ETE
Add ETE as one of the supported device types in perf cs_etm testcase. Reviewed-by: James Clark <[email protected]> Signed-off-by: Ruidong Tian <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Mike Leach <[email protected]> Cc: Suzuki Poulouse <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 5cdb51b commit bb35084

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tools/perf/tests/shell/test_arm_coresight.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@
1111

1212
glb_err=0
1313

14+
cs_etm_dev_name() {
15+
cs_etm_path=$(find /sys/bus/event_source/devices/cs_etm/ -name cpu* -print -quit)
16+
trcdevarch=$(cat ${cs_etm_path}/mgmt/trcdevarch)
17+
archhver=$((($trcdevarch >> 12) & 0xf))
18+
archpart=$(($trcdevarch & 0xfff))
19+
20+
if [ $archhver -eq 5 -a "$(printf "0x%X\n" $archpart)" = "0xA13" ] ; then
21+
echo "ete"
22+
else
23+
echo "etm"
24+
fi
25+
}
26+
1427
skip_if_no_cs_etm_event() {
1528
perf list | grep -q 'cs_etm//' && return 0
1629

@@ -136,7 +149,7 @@ arm_cs_iterate_devices() {
136149

137150
arm_cs_etm_traverse_path_test() {
138151
# Iterate for every ETM device
139-
for dev in /sys/bus/coresight/devices/etm*; do
152+
for dev in /sys/bus/coresight/devices/$(cs_etm_dev_name)*; do
140153

141154
# Find the ETM device belonging to which CPU
142155
cpu=`cat $dev/cpu`

0 commit comments

Comments
 (0)