linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/test: perf test 86 fails on s390 repo linux-next
@ 2024-09-16 12:57 Thomas Richter
  2024-09-26 22:42 ` Namhyung Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Richter @ 2024-09-16 12:57 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme
  Cc: agordeev, gor, sumanthk, hca, Thomas Richter

Command perf test 86 fails on s390 using linux-next repository:
 # perf test -F 86
 ping 868299 [007] 28248.013596: probe_libc:inet_pton_1: (3ff95948020)
 3ff95948020 inet_pton+0x0 (inlined)
 3ff9595e6e7 text_to_binary_address+0x1007 (inlined)
 3ff9595e6e7 gaih_inet+0x1007 (inlined)
 FAIL: expected backtrace entry \
	 "main\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$"
	 got "3ff9595e6e7 gaih_inet+0x1007 (inlined)"
 86: probe libc's inet_pton & backtrace it with ping  : FAILED!
 #

The root cause is a new stack layout, some functions have been added
as seen below. Add text_to_binary_address and friends to the
list of expected functions.

 # perf script | tac | grep -m1 '^ping' -B9 | tac
 ping  866856 [007] 25979.494921: probe_libc:inet_pton: (3ff8ec48020)
	     3ff8ec48020 inet_pton+0x0 (inlined)
	     3ff8ec5e6e7 text_to_binary_address+0x1007 (inlined)
	     3ff8ec5e6e7 gaih_inet+0x1007 (inlined)
	     3ff8ec5e6e7 getaddrinfo+0x1007 (/usr/lib64/libc.so.6)
	     2aa3fe04bf5 main+0xff5 (/usr/bin/ping)
	     3ff8eb34a5b __libc_start_call_main+0x8b (/usr/lib64/libc.so.6)
	     3ff8eb34b5d __libc_start_main@GLIBC_2.2+0xad (inlined)
	     2aa3fe06a1f [unknown] (/usr/bin/ping)

 #

Output after:
 # perf test -F 86
 86: 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 insertions(+)

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 f38c8ead0b03..bc6e2fe1d999 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -40,6 +40,8 @@ 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
 		;;
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-30 23:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 12:57 [PATCH] perf/test: perf test 86 fails on s390 repo linux-next Thomas Richter
2024-09-26 22:42 ` Namhyung Kim
2024-09-30 12:30   ` Thomas Richter
2024-09-30 23:26     ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).