diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-08-08 16:26:13 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-08-08 22:30:39 +0200 |
commit | 9e9d0a79d34716f8e2590ccab0eee08f4fdfc7f4 (patch) | |
tree | 69656b638b6c6c8a6f202eaa591c3e8c4958ba43 /tools/perf/tests/shell | |
parent | perf test: Add set of perf record LBR tests (diff) | |
download | linux-9e9d0a79d34716f8e2590ccab0eee08f4fdfc7f4.tar.xz linux-9e9d0a79d34716f8e2590ccab0eee08f4fdfc7f4.zip |
perf test shell lbr: Support hybrid x86 systems too
Running on a:
root@x1:~# grep 'model name' -m1 /proc/cpuinfo
model name : 13th Gen Intel(R) Core(TM) i7-1365U
root@x1:~#
It skips all the tests with:
root@x1:~# perf test -vvvv LBR
97: perf record LBR tests:
--- start ---
test child forked, pid 2033388
Skip: only x86 CPUs support LBR
---- end(-2) ----
97: perf record LBR tests : Skip
root@x1:~#
Because the test checks for the /sys/devices/cpu/caps/branches file,
that isn't present as we have instead:
root@x1:~# ls -la /sys/devices/cpu*/caps/branches
-r--r--r--. 1 root root 4096 Aug 8 11:22 /sys/devices/cpu_atom/caps/branches
-r--r--r--. 1 root root 4096 Aug 8 11:21 /sys/devices/cpu_core/caps/branches
root@x1:~#
If we check as well for one of those,
/sys/devices/cpu_core/caps/branches, then we don't skip the tests and
all are run on these x86 Intel Hybrid systems as well, passing all of
them:
root@x1:~# perf test -vvvv LBR
97: perf record LBR tests:
--- start ---
test child forked, pid 2034956
LBR callgraph
[ perf record: Woken up 5 times to write data ]
[ perf record: Captured and wrote 1.812 MB /tmp/__perf_test.perf.data.B2HvQ (8114 samples) ]
LBR callgraph [Success]
LBR any branch test
[ perf record: Woken up 25 times to write data ]
[ perf record: Captured and wrote 6.382 MB /tmp/__perf_test.perf.data.B2HvQ (8071 samples) ]
LBR any branch test: 8071 samples
LBR any branch test [Success]
LBR any call test
[ perf record: Woken up 23 times to write data ]
[ perf record: Captured and wrote 6.208 MB /tmp/__perf_test.perf.data.B2HvQ (8092 samples) ]
LBR any call test: 8092 samples
LBR any call test [Success]
LBR any ret test
[ perf record: Woken up 24 times to write data ]
[ perf record: Captured and wrote 6.396 MB /tmp/__perf_test.perf.data.B2HvQ (8093 samples) ]
LBR any ret test: 8093 samples
LBR any ret test [Success]
LBR any indirect call test
[ perf record: Woken up 25 times to write data ]
[ perf record: Captured and wrote 6.344 MB /tmp/__perf_test.perf.data.B2HvQ (8067 samples) ]
LBR any indirect call test: 8067 samples
LBR any indirect call test [Success]
LBR any indirect jump test
[ perf record: Woken up 12 times to write data ]
[ perf record: Captured and wrote 3.073 MB /tmp/__perf_test.perf.data.B2HvQ (8061 samples) ]
LBR any indirect jump test: 8061 samples
LBR any indirect jump test [Success]
LBR direct calls test
[ perf record: Woken up 25 times to write data ]
[ perf record: Captured and wrote 6.380 MB /tmp/__perf_test.perf.data.B2HvQ (8076 samples) ]
LBR direct calls test: 8076 samples
LBR direct calls test [Success]
LBR any indirect user call test
[ perf record: Woken up 5 times to write data ]
[ perf record: Captured and wrote 1.597 MB /tmp/__perf_test.perf.data.B2HvQ (8079 samples) ]
LBR any indirect user call test: 8079 samples
LBR any indirect user call test [Success]
LBR system wide any branch test
[ perf record: Woken up 26 times to write data ]
[ perf record: Captured and wrote 9.088 MB /tmp/__perf_test.perf.data.B2HvQ (9209 samples) ]
LBR system wide any branch test: 9209 samples
LBR system wide any branch test [Success]
LBR system wide any call test
[ perf record: Woken up 25 times to write data ]
[ perf record: Captured and wrote 8.945 MB /tmp/__perf_test.perf.data.B2HvQ (9333 samples) ]
LBR system wide any call test: 9333 samples
LBR system wide any call test [Success]
LBR parallel any branch test
LBR parallel any call test
LBR parallel any ret test
LBR parallel any indirect call test
LBR parallel any indirect jump test
LBR parallel direct calls test
LBR parallel system wide any branch test
LBR parallel any indirect user call test
LBR parallel system wide any call test
[ perf record: Woken up 9 times to write data ]
[ perf record: Woken up 51 times to write data ]
[ perf record: Woken up 1 times to write data ]
[ perf record: Woken up 5 times to write data ]
[ perf record: Woken up 559 times to write data ]
[ perf record: Woken up 14 times to write data ]
[ perf record: Woken up 17 times to write data ]
[ perf record: Woken up 1 times to write data ]
[ perf record: Woken up 11 times to write data ]
[ perf record: Captured and wrote 0.150 MB /tmp/__perf_test.perf.data.lANpR (1909 samples) ]
[ perf record: Captured and wrote 2.371 MB /tmp/__perf_test.perf.data.Olum8 (3033 samples) ]
[ perf record: Captured and wrote 1.230 MB /tmp/__perf_test.perf.data.njfJ8 (1742 samples) ]
[ perf record: Captured and wrote 5.554 MB /tmp/__perf_test.perf.data.4ZTrj (29662 samples) ]
[ perf record: Captured and wrote 19.906 MB /tmp/__perf_test.perf.data.dlGQt (29576 samples) ]
[ perf record: Captured and wrote 0.289 MB /tmp/__perf_test.perf.data.CAT7y (4311 samples) ]
[ perf record: Captured and wrote 3.129 MB /tmp/__perf_test.perf.data.diuKG (3971 samples) ]
LBR parallel any indirect user call test: 1909 samples
[ perf record: Captured and wrote 4.858 MB /tmp/__perf_test.perf.data.sVjtN (6130 samples) ]
LBR parallel any indirect user call test [Success]
[ perf record: Captured and wrote 3.669 MB /tmp/__perf_test.perf.data.AJtNI (4827 samples) ]
LBR parallel any indirect jump test: 4311 samples
LBR parallel any indirect jump test [Success]
LBR parallel direct calls test: 3033 samples
LBR parallel direct calls test [Success]
LBR parallel any indirect call test: 1742 samples
LBR parallel any indirect call test [Success]
LBR parallel any call test: 4827 samples
LBR parallel any call test [Success]
LBR parallel any branch test: 6130 samples
LBR parallel any branch test [Success]
LBR parallel system wide any branch test: 29662 samples
LBR parallel any ret test: 3971 samples
LBR parallel any ret test [Success]
LBR parallel system wide any branch test [Success]
LBR parallel system wide any call test: 29576 samples
LBR parallel system wide any call test [Success]
---- end(0) ----
97: perf record LBR tests : Ok
root@x1:~#
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/ZrTXftup0H46R8WK@x1
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/shell')
-rwxr-xr-x | tools/perf/tests/shell/record_lbr.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/record_lbr.sh b/tools/perf/tests/shell/record_lbr.sh index baf168d0ddbb..32314641217e 100755 --- a/tools/perf/tests/shell/record_lbr.sh +++ b/tools/perf/tests/shell/record_lbr.sh @@ -4,7 +4,7 @@ set -e -if [ ! -f /sys/devices/cpu/caps/branches ] +if [ ! -f /sys/devices/cpu/caps/branches ] && [ ! -f /sys/devices/cpu_core/caps/branches ] then echo "Skip: only x86 CPUs support LBR" exit 2 |