Skip to contentSkip to conversation

perf test record+probe_libc_inet_pton: Fix call chain match on ppc64le

PATCH New Michael Petlan 1 participant 1 message Nov 16, 2023 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf test record+probe_libc_inet_pton: Fix call chain match on ppc64le

The test case probe libc's inet_pton & backtrace it with ping fails with updated glibc on ppc64le. It appears to be related to commits:
1f85d016768f ("perf test record+probe_libc_inet_pton: Fix call chain match on x86_64") 311693ce81c9 ("perf test record+probe_libc_inet_pton: Fix call chain match on s390")

In ppc64le case, "gaih_inet" does not show up in the call chain anymore.

Output before:

  # perf test -vvv inet_pton
   85: probe libc's inet_pton & backtrace it with ping                 :
  --- start ---
  test child forked, pid 126720
  ping 126748 [006] 79153.090766: probe_libc:inet_pton: (7fff8ef35488)
  7fff8ef35488 __GI___inet_pton+0x8 (/usr/lib64/libc.so.6)
  7fff8eee3a3c getaddrinfo+0x12fc (/usr/lib64/libc.so.6)
  FAIL: expected backtrace entry "gaih_inet.*\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/libc.so.6\)$" got "7fff8eee3a3c getaddrinfo+0x12fc (/usr/lib64/libc.so.6)"
  test child finished with -1
  ---- end ----
  probe libc's inet_pton & backtrace it with ping: FAILED!

Output after:

  # perf test -vvv inet_pton
   85: probe libc's inet_pton & backtrace it with ping                 :
  --- start ---
  test child forked, pid 126996
  ping 127024 [007] 79698.558646: probe_libc:inet_pton: (7fff97445488)
  7fff97445488 __GI___inet_pton+0x8 (/usr/lib64/libc.so.6)
  7fff973f3a3c getaddrinfo+0x12fc (/usr/lib64/libc.so.6)
  108323534 main+0x824 (/usr/bin/ping)
  test child finished with 0
  ---- end ----
  probe libc's inet_pton & backtrace it with ping: Ok
---
 tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 1 -
 1 file changed, 1 deletion(-)
tools/perf/tests/shell/record+probe_libc_inet_pton.sh +0 -1
index eebeea6bdc76..e8f988ffecf0 100755
@@ -45,7 +45,6 @@ trace_libc_inet_pton_backtrace() {
 		;;
 	ppc64|ppc64le)
 		eventattr='max-stack=4'
-		echo "gaih_inet.*\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected
 		echo "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected
 		echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
 		;;
Signature · 1 line
2.18.4