perf test: update arm64 perf_event_attr tests for --call-graph
Subsystems (4)
PATCH 1/1 perf test: update arm64 perf_event_attr tests for --call-graph
The struct perf_event_attr is initialised differently in Arm64 when recording in call-graph fp mode, so update the relevant tests, and add two extra arm64-only tests.
--- tools/perf/tests/attr/README | 2 ++ tools/perf/tests/attr/test-record-graph-default | 2 ++ tools/perf/tests/attr/test-record-graph-default-aarch64 | 9 +++++++++ tools/perf/tests/attr/test-record-graph-fp | 2 ++ tools/perf/tests/attr/test-record-graph-fp-aarch64 | 9 +++++++++ 5 files changed, 24 insertions(+) create mode 100644 tools/perf/tests/attr/test-record-graph-default-aarch64 create mode 100644 tools/perf/tests/attr/test-record-graph-fp-aarch64
tools/perf/tests/attr/README +2 -0
@@ -45,8 +45,10 @@ Following tests are defined (with perf commands): perf record -d kill (test-record-data) perf record -F 100 kill (test-record-freq) perf record -g kill (test-record-graph-default) + perf record -g kill (test-record-graph-default-aarch64) perf record --call-graph dwarf kill (test-record-graph-dwarf) perf record --call-graph fp kill (test-record-graph-fp) + perf record --call-graph fp kill (test-record-graph-fp-aarch64) perf record --group -e cycles,instructions kill (test-record-group) perf record -e '{cycles,instructions}' kill (test-record-group1) perf record -e '{cycles/period=1/,instructions/period=2/}:S' kill (test-record-group2)
tools/perf/tests/attr/test-record-graph-default +2 -0
@@ -2,6 +2,8 @@ command = record args = --no-bpf-event -g kill >/dev/null 2>&1 ret = 1 +# arm64 enables registers in the default mode (fp) +arch = !aarch64 [event:base-record] sample_type=295
tools/perf/tests/attr/test-record-graph-default-aarch64 new file +9 -0
@@ -0,0 +1,9 @@ +[config] +command = record +args = --no-bpf-event -g kill >/dev/null 2>&1 +ret = 1 +arch = aarch64 + +[event:base-record] +sample_type=4391 +sample_regs_user=1073741824
tools/perf/tests/attr/test-record-graph-fp +2 -0
@@ -2,6 +2,8 @@ command = record args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 ret = 1 +# arm64 enables registers in fp mode +arch = !aarch64 [event:base-record] sample_type=295
tools/perf/tests/attr/test-record-graph-fp-aarch64 new file +9 -0
@@ -0,0 +1,9 @@ +[config] +command = record +args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 +ret = 1 +arch = aarch64 + +[event:base-record] +sample_type=4391 +sample_regs_user=1073741824
Signature · 1 line
2.25.1
Hi,
Friendly ping on this perf-test fix for arm64
I will include some quick test notes:
Before:
$ ./perf test 17 -v 17: Setup struct perf_event_attr [...] running './tests/attr/test-record-graph-default' expected sample_type=295, got 4391 expected sample_regs_user=0, got 1073741824 FAILED './tests/attr/test-record-graph-default' - match failure test child finished with -1 ---- end ----
After:
[...]
running './tests/attr/test-record-graph-default-aarch64' test limitation 'aarch64'
running './tests/attr/test-record-graph-fp-aarch64' test limitation 'aarch64'
running './tests/attr/test-record-graph-default' test limitation '!aarch64'
excluded architecture list ['aarch64']
skipped [aarch64] './tests/attr/test-record-graph-default' running './tests/attr/test-record-graph-fp'
test limitation '!aarch64'
excluded architecture list ['aarch64']
skipped [aarch64] './tests/attr/test-record-graph-fp' [...]
Thanks,
German
Quoted 87 lines · German Gomez
The struct
perf_event_attris initialised differently in Arm64 when recording in call-graph fp mode, so update the relevant tests, and add two extra arm64-only tests.Fixes 7248e308a575 ("perf tools: Record ARM64 LR register automatically")Signed-off-by German Gomez <[email protected]>--- tools/perf/tests/attr/README | 2 ++ tools/perf/tests/attr/test-record-graph-default | 2 ++ tools/perf/tests/attr/test-record-graph-default-aarch64 | 9 +++++++++ tools/perf/tests/attr/test-record-graph-fp | 2 ++ tools/perf/tests/attr/test-record-graph-fp-aarch64 | 9 +++++++++ 5 files changed, 24 insertions(+) create mode 100644 tools/perf/tests/attr/test-record-graph-default-aarch64 create mode 100644 tools/perf/tests/attr/test-record-graph-fp-aarch64tools/perf/tests/attr/README +2
-0@@ -45,8 +45,10 @@ Following tests are defined (with perf commands): perf record -d kill (test-record-data) perf record -F 100 kill (test-record-freq) perf record -g kill (test-record-graph-default) + perf record -g kill (test-record-graph-default-aarch64) perf record --call-graph dwarf kill (test-record-graph-dwarf) perf record --call-graph fp kill (test-record-graph-fp) + perf record --call-graph fp kill (test-record-graph-fp-aarch64) perf record --group -e cycles,instructions kill (test-record-group) perf record -e '{cycles,instructions}' kill (test-record-group1) perf record -e '{cycles/period=1/,instructions/period=2/}:S' kill (test-record-group2)tools/perf/tests/attr/test-record-graph-default +2
-0@@ -2,6 +2,8 @@ command = record args = --no-bpf-event -g kill >/dev/null 2>&1 ret = 1 +# arm64 enables registers in the default mode (fp) +arch = !aarch64 [event:base-record] sample_type=295tools/perf/tests/attr/test-record-graph-default-aarch64 new file +9
-0@@ -0,0 +1,9 @@ +[config] +command = record +args = --no-bpf-event -g kill >/dev/null 2>&1 +ret = 1 +arch = aarch64 + +[event:base-record] +sample_type=4391 +sample_regs_user=1073741824tools/perf/tests/attr/test-record-graph-fp +2
-0@@ -2,6 +2,8 @@ command = record args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 ret = 1 +# arm64 enables registers in fp mode +arch = !aarch64 [event:base-record] sample_type=295tools/perf/tests/attr/test-record-graph-fp-aarch64 new file +9
-0@@ -0,0 +1,9 @@ +[config] +command = record +args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 +ret = 1 +arch = aarch64 + +[event:base-record] +sample_type=4391 +sample_regs_user=1073741824
Arnaldo Carvalho de Melo
maintainerEm Wed, Feb 16, 2022 at 01:17:56PM +0000, German Gomez escreveu:
Quoted 5 lines
Hi,
Friendly ping on this perf-test fix for arm64
I will include some quick test notes:
Thanks, adding it to the cset, applying.
- Arnaldo
Quoted 120 lines
Before:
$ ./perf test 17 -v 17: Setup struct perf_event_attr [...] running './tests/attr/test-record-graph-default' expected sample_type=295, got 4391 expected sample_regs_user=0, got 1073741824 FAILED './tests/attr/test-record-graph-default' - match failure test child finished with -1 ---- end ----After:
[...]
running './tests/attr/test-record-graph-default-aarch64' test limitation 'aarch64'
running './tests/attr/test-record-graph-fp-aarch64' test limitation 'aarch64'
running './tests/attr/test-record-graph-default' test limitation '!aarch64'
excluded architecture list ['aarch64']
skipped [aarch64] './tests/attr/test-record-graph-default' running './tests/attr/test-record-graph-fp'
test limitation '!aarch64'
excluded architecture list ['aarch64']
skipped [aarch64] './tests/attr/test-record-graph-fp' [...]Thanks,
GermanQuoted 87 lines · German Gomez
The struct
perf_event_attris initialised differently in Arm64 when recording in call-graph fp mode, so update the relevant tests, and add two extra arm64-only tests.Fixes 7248e308a575 ("perf tools: Record ARM64 LR register automatically")Signed-off-by German Gomez <[email protected]>--- tools/perf/tests/attr/README | 2 ++ tools/perf/tests/attr/test-record-graph-default | 2 ++ tools/perf/tests/attr/test-record-graph-default-aarch64 | 9 +++++++++ tools/perf/tests/attr/test-record-graph-fp | 2 ++ tools/perf/tests/attr/test-record-graph-fp-aarch64 | 9 +++++++++ 5 files changed, 24 insertions(+) create mode 100644 tools/perf/tests/attr/test-record-graph-default-aarch64 create mode 100644 tools/perf/tests/attr/test-record-graph-fp-aarch64tools/perf/tests/attr/README +2
-0@@ -45,8 +45,10 @@ Following tests are defined (with perf commands): perf record -d kill (test-record-data) perf record -F 100 kill (test-record-freq) perf record -g kill (test-record-graph-default) + perf record -g kill (test-record-graph-default-aarch64) perf record --call-graph dwarf kill (test-record-graph-dwarf) perf record --call-graph fp kill (test-record-graph-fp) + perf record --call-graph fp kill (test-record-graph-fp-aarch64) perf record --group -e cycles,instructions kill (test-record-group) perf record -e '{cycles,instructions}' kill (test-record-group1) perf record -e '{cycles/period=1/,instructions/period=2/}:S' kill (test-record-group2)tools/perf/tests/attr/test-record-graph-default +2
-0@@ -2,6 +2,8 @@ command = record args = --no-bpf-event -g kill >/dev/null 2>&1 ret = 1 +# arm64 enables registers in the default mode (fp) +arch = !aarch64 [event:base-record] sample_type=295tools/perf/tests/attr/test-record-graph-default-aarch64 new file +9
-0@@ -0,0 +1,9 @@ +[config] +command = record +args = --no-bpf-event -g kill >/dev/null 2>&1 +ret = 1 +arch = aarch64 + +[event:base-record] +sample_type=4391 +sample_regs_user=1073741824tools/perf/tests/attr/test-record-graph-fp +2
-0@@ -2,6 +2,8 @@ command = record args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 ret = 1 +# arm64 enables registers in fp mode +arch = !aarch64 [event:base-record] sample_type=295tools/perf/tests/attr/test-record-graph-fp-aarch64 new file +9
-0@@ -0,0 +1,9 @@ +[config] +command = record +args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 +ret = 1 +arch = aarch64 + +[event:base-record] +sample_type=4391 +sample_regs_user=1073741824
Signature · 1 line
- Arnaldo