#!/bin/bash # Check Arm SPE trace data recording and synthesized samples (exclusive)
# Uses the 'perf record' to record trace data of Arm SPE events; # then verify if any SPE event samples are generated by SPE with # 'perf script' and 'perf report' commands.
# SPDX-License-Identifier: GPL-2.0 # German Gomez <german.gomez@arm.com>, 2021
for f in /sys/bus/event_source/devices/arm_spe_*; do if [ -e "$f/format/discard" ]; then
cpu=$(cut -c -1 "$f/cpumask")
break fi done
if [ -z $cpu ]; then
arm_spe_report "SPE discard mode not present" 2
return fi
# Test can use wildcard SPE instance and Perf will only open the event # on instances that have that format flag. But make sure the target # runs on an instance with discard mode otherwise we're not testing # anything.
perf record -o ${perfdata} -e arm_spe/discard/ -N -B --no-bpf-event \
-- taskset --cpu-list $cpu true
if perf report -i ${perfdata} --stats | grep 'AUX events\|AUXTRACE events'; then
arm_spe_report "SPE discard mode found unexpected data" 1 else
arm_spe_report "SPE discard mode" 0 fi
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.