Skip to contentSkip to conversation

perf test: Fix perf test case 84 on s390

PATCH Superseded Thomas Richter 2 participants 2 messages Oct 18, 2024 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf test: Fix perf test case 84 on s390

Perf test case 84 'perf pipe recording and injection test' sometime fails on s390, especially on z/VM virtual machines.

This is caused by a very short run time of workload

  # perf test -w noploop

which runs for 1 second. Occasionally this is not long enough and the perf report has no samples for symbol noploop.

Fix this and enlarge the runtime for the perf work load to 3 seconds. This ensures the symbol noploop is always present. Since only s390 is affected, make this loop architecture dependend.

Output before:
Inject -b build-ids test
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.277 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.160 MB

			 /tmp/perf.data.ELzRdq (4031 samples) ]

[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ] Inject -b build-ids test [Success]

Inject --buildid-all build-ids test
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.014 MB - ] Inject --buildid-all build-ids test [Failed - cannot find
noploop function in pipe #2]

Output after:
Successful execution for over 10 times in a loop.

---
 tools/perf/tests/shell/pipe_test.sh | 1 +
 1 file changed, 1 insertion(+)
tools/perf/tests/shell/pipe_test.sh +1 -0
index d4c8005ce9b9..e459aa99a951 100755
@@ -13,6 +13,7 @@ skip_test_missing_symbol ${sym}
 data=$(mktemp /tmp/perf.data.XXXXXX)
 data2=$(mktemp /tmp/perf.data2.XXXXXX)
 prog="perf test -w noploop"
+[ "$(uname -m)" = "s390x" ] && prog="$prog 3"
 err=0
 
 set -e
Signature · 1 line
2.47.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 41 lines · Thomas Richter

Perf test case 84 'perf pipe recording and injection test' sometime fails on s390, especially on z/VM virtual machines.

This is caused by a very short run time of workload

  # perf test -w noploop

which runs for 1 second. Occasionally this is not long enough and the perf report has no samples for symbol noploop.

Fix this and enlarge the runtime for the perf work load to 3 seconds. This ensures the symbol noploop is always present. Since only s390 is affected, make this loop architecture dependend.

Output before:
Inject -b build-ids test
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.277 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.160 MB

                         /tmp/perf.data.ELzRdq (4031 samples) ]

[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.195 MB - ] Inject -b build-ids test [Success]

Inject --buildid-all build-ids test
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.195 MB - ]
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.014 MB - ] Inject --buildid-all build-ids test [Failed - cannot find
noploop function in pipe #2]

Quoted 6 lines

Output after:
Successful execution for over 10 times in a loop.

Lgtm, fwiw if we can land the parallel testing [1] I'm not sure it matters if a test takes 3 seconds to run as long as it is running amongst the concurrently running tests.

Thanks,
Ian
[1] https://lore.kernel.org/lkml/[email protected]/

Quoted 20 lines
---
 tools/perf/tests/shell/pipe_test.sh | 1 +
 1 file changed, 1 insertion(+)
tools/perf/tests/shell/pipe_test.sh +1 -1
index d4c8005ce9b9..e459aa99a951 100755
@@ -13,6 +13,7 @@ skip_test_missing_symbol ${sym}
 data=$(mktemp /tmp/perf.data.XXXXXX)
 data2=$(mktemp /tmp/perf.data2.XXXXXX)
 prog="perf test -w noploop"
+[ "$(uname -m)" = "s390x" ] && prog="$prog 3"
 err=0
 
 set -e
--

2.47.0