diff options
| -rwxr-xr-x | tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh index 8b3da21a08f1..c446c894b297 100755 --- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh +++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | |||
| @@ -22,10 +22,23 @@ trace_libc_inet_pton_backtrace() { | |||
| 22 | expected[4]="rtt min.*" | 22 | expected[4]="rtt min.*" |
| 23 | expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)" | 23 | expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)" |
| 24 | expected[6]=".*inet_pton[[:space:]]\($libc\)$" | 24 | expected[6]=".*inet_pton[[:space:]]\($libc\)$" |
| 25 | expected[7]="getaddrinfo[[:space:]]\($libc\)$" | 25 | case "$(uname -m)" in |
| 26 | expected[8]=".*\(.*/bin/ping.*\)$" | 26 | s390x) |
| 27 | 27 | eventattr='call-graph=dwarf' | |
| 28 | perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do | 28 | expected[7]="gaih_inet[[:space:]]\(inlined\)$" |
| 29 | expected[8]="__GI_getaddrinfo[[:space:]]\(inlined\)$" | ||
| 30 | expected[9]="main[[:space:]]\(.*/bin/ping.*\)$" | ||
| 31 | expected[10]="__libc_start_main[[:space:]]\($libc\)$" | ||
| 32 | expected[11]="_start[[:space:]]\(.*/bin/ping.*\)$" | ||
| 33 | ;; | ||
| 34 | *) | ||
| 35 | eventattr='max-stack=3' | ||
| 36 | expected[7]="getaddrinfo[[:space:]]\($libc\)$" | ||
| 37 | expected[8]=".*\(.*/bin/ping.*\)$" | ||
| 38 | ;; | ||
| 39 | esac | ||
| 40 | |||
| 41 | perf trace --no-syscalls -e probe_libc:inet_pton/$eventattr/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do | ||
| 29 | echo $line | 42 | echo $line |
| 30 | echo "$line" | egrep -q "${expected[$idx]}" | 43 | echo "$line" | egrep -q "${expected[$idx]}" |
| 31 | if [ $? -ne 0 ] ; then | 44 | if [ $? -ne 0 ] ; then |
| @@ -33,7 +46,7 @@ trace_libc_inet_pton_backtrace() { | |||
| 33 | exit 1 | 46 | exit 1 |
| 34 | fi | 47 | fi |
| 35 | let idx+=1 | 48 | let idx+=1 |
| 36 | [ $idx -eq 9 ] && break | 49 | [ -z "${expected[$idx]}" ] && break |
| 37 | done | 50 | done |
| 38 | } | 51 | } |
| 39 | 52 | ||
