Skip to content

Commit 9440ebd

Browse files
James-A-Clarkacmel
authored andcommitted
perf test arm64: Add attr tests for new VG register
Ensure that the availability of the VG register behaves as expected depending on the kernel version and SVE support. Signed-off-by: James Clark <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent ee26adf commit 9440ebd

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Test that asking for VG fails if the system doesn't support SVE. This
2+
# applies both before and after the feature was added in 6.1
3+
[config]
4+
command = record
5+
args = --no-bpf-event --user-regs=vg kill >/dev/null 2>&1
6+
ret = 129
7+
test_ret = true
8+
arch = aarch64
9+
auxv = auxv["AT_HWCAP"] & 0x200000 == 0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Test that asking for VG always fails on old kernels because it was
2+
# added in 6.1. This applies to systems that either support or don't
3+
# support SVE.
4+
[config]
5+
command = record
6+
args = --no-bpf-event --user-regs=vg kill >/dev/null 2>&1
7+
ret = 129
8+
test_ret = true
9+
arch = aarch64
10+
kernel_until = 6.1
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Test that asking for VG works if the system has SVE and after the
2+
# feature was added in 6.1
3+
[config]
4+
command = record
5+
args = --no-bpf-event --user-regs=vg kill >/dev/null 2>&1
6+
ret = 1
7+
test_ret = true
8+
arch = aarch64
9+
auxv = auxv["AT_HWCAP"] & 0x200000 == 0x200000
10+
kernel_since = 6.1
11+
12+
[event:base-record]
13+
sample_type=4359
14+
sample_regs_user=70368744177664

0 commit comments

Comments
 (0)