Skip to content

Commit 2dac1f0

Browse files
Thomas Richteracmel
authored andcommitted
perf test: Fix 'perf script' tests on s390
In linux next repo, test case 'perf script tests' fails on s390. The root case is a command line invocation of 'perf record' with call-graph information. On s390 only DWARF formatted call-graphs are supported and only on software events. Change the command line parameters for s390. Output before: # perf test 89 89: perf script tests : FAILED! # Output after: # perf test 89 89: perf script tests : Ok # Fixes: 0dd5041 ("perf addr_location: Add init/exit/copy functions") Reviewed-by: Ian Rogers <[email protected]> Signed-off-by: Thomas Richter <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Sumanth Korikkar <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Vasily Gorbik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent b0dc992 commit 2dac1f0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/perf/tests/shell/script.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ def sample_table(*args):
5454
def call_path_table(*args):
5555
print(f'call_path_table({args}')
5656
_end_of_file_
57-
perf record -g -o "${perfdatafile}" true
57+
case $(uname -m)
58+
in s390x)
59+
cmd_flags="--call-graph dwarf -e cpu-clock";;
60+
*)
61+
cmd_flags="-g";;
62+
esac
63+
64+
perf record $cmd_flags -o "${perfdatafile}" true
5865
perf script -i "${perfdatafile}" -s "${db_test}"
5966
echo "DB test [Success]"
6067
}

0 commit comments

Comments
 (0)