File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ perf_tool=perf
9
9
err=0
10
10
11
11
test_event_uniquifying () {
12
- # We use `clockticks` to verify the uniquify behavior.
12
+ # We use `clockticks` in `uncore_imc` to verify the uniquify behavior.
13
+ pmu=" uncore_imc"
13
14
event=" clockticks"
14
15
15
16
# If the `-A` option is added, the event should be uniquified.
@@ -43,11 +44,18 @@ test_event_uniquifying() {
43
44
echo " stat event uniquifying test"
44
45
uniquified_event_array=()
45
46
47
+ # Skip if the machine does not have `uncore_imc` device.
48
+ if ! ${perf_tool} list pmu | grep -q ${pmu} ; then
49
+ echo " Target does not support PMU ${pmu} [Skipped]"
50
+ err=2
51
+ return
52
+ fi
53
+
46
54
# Check how many uniquified events.
47
55
while IFS= read -r line; do
48
56
uniquified_event=$( echo " $line " | awk ' {print $1}' )
49
57
uniquified_event_array+=(" ${uniquified_event} " )
50
- done < <( ${perf_tool} list -v ${event} | grep " \[Kernel PMU event\] " )
58
+ done < <( ${perf_tool} list -v ${event} | grep ${pmu} )
51
59
52
60
perf_command=" ${perf_tool} stat -e $event -A -o ${stat_output} -- true"
53
61
$perf_command
You can’t perform that action at this time.
0 commit comments