Fix perf test probe libc's inet_pton on s390

Message ID 20230503081134.3372415-1-tmricht@linux.ibm.com
State New
Headers
Series Fix perf test probe libc's inet_pton on s390 |

Commit Message

Thomas Richter May 3, 2023, 8:11 a.m. UTC
  With Fedora 38 the perf test 86 probe libc's inet_pton
fails on s390. The call chain of the ping command changed.
The functions text_to_binary_address() and gaih_inet() do
not show up in the call chain anymore.

Output before:
 # ./perf test -v 86
 86: probe libc's inet_pton & backtrace it with ping                 :
 --- start ---
 test child forked, pid 541050
 fgrep: warning: fgrep is obsolescent; using grep -F
 fgrep: warning: fgrep is obsolescent; using grep -F
 BFD: DWARF error: could not find variable specification at offset 0x22011
 ...

 ping 541078 [002] 348826.679581: probe_libc:inet_pton_1: (3ffad84b940)
 14b940 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
 10e9c3 __GI_getaddrinfo+0xeb3 (inlined)
 4397 main+0x737 (/usr/bin/ping)
  FAIL: expected backtrace entry "gaih_inet.*\+0x[[:xdigit:]]\
         +[[:space:]]\(/usr/lib64/libc.so.6|inlined\)$"
         got "4397 main+0x737 (/usr/bin/ping)"
 test child finished with -1
 ---- end ----
 probe libc's inet_pton & backtrace it with ping: FAILED!
 #

Output after:
 # ./perf test -v 86
 86: probe libc's inet_pton & backtrace it with ping                 :
 --- start ---
 test child forked, pid 541098
 fgrep: warning: fgrep is obsolescent; using grep -F
 fgrep: warning: fgrep is obsolescent; using grep -F
 BFD: DWARF error: could not find variable specification at offset 0x309d1
 ...

 ping 541126 [006] 349309.099067: probe_libc:inet_pton_1: (3ffb7f4b940)
 14b940 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
 10e9c3 __GI_getaddrinfo+0xeb3 (inlined)
 4397 main+0x737 (/usr/bin/ping)
 test child finished with 0
 ---- end ----
 probe libc's inet_pton & backtrace it with ping: Ok
 #

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
---
 tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Arnaldo Carvalho de Melo May 3, 2023, 2:15 p.m. UTC | #1
Em Wed, May 03, 2023 at 10:11:34AM +0200, Thomas Richter escreveu:
> With Fedora 38 the perf test 86 probe libc's inet_pton
> fails on s390. The call chain of the ping command changed.
> The functions text_to_binary_address() and gaih_inet() do
> not show up in the call chain anymore.

Thanks, applied.

- Arnaldo
  

Patch

diff --git a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
index b4149b2db4c6..4c739056cb65 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -38,8 +38,6 @@  trace_libc_inet_pton_backtrace() {
 	case "$(uname -m)" in
 	s390x)
 		eventattr='call-graph=dwarf,max-stack=4'
-		echo "text_to_binary_address.*\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" >> $expected
-		echo "gaih_inet.*\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" >> $expected
 		echo "(__GI_)?getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" >> $expected
 		echo "main\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" >> $expected
 		;;