linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/tests: fix record+probe_libc_inet_pton test on aarch64
@ 2024-10-15  7:53 Jing Zhang
  2024-10-17 22:12 ` Namhyung Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Jing Zhang @ 2024-10-15  7:53 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Namhyung Kim, Peter Zijlstra,
	Thomas Richter, linux-perf-users, linux-kernel
  Cc: xueshuai, zhuo.song

Since commit 1f85d016768f ("perf test record+probe_libc_inet_pton: Fix
call chain match on x86_64") remove function getaddrinfo() on expected
file, the test failed on aarch64. On aarch64, function getaddrinfo()
show up in the call chain.

$perf script -i /tmp/perf.data.1PV
ping 2588319 [125] 500119.122843: probe_libc:inet_pton: (ffff9a4f7410)
            ffff9a4f7410 __GI___inet_pton+0x0 (/usr/lib64/libc-2.32.so)
            ffff9a4c5f7c getaddrinfo+0xec (/usr/lib64/libc-2.32.so)
            aaaad6d32b38 [unknown] (/usr/bin/ping)

So just remove getaddrinfo() on x86_64.

Fixes: 1f85d016768f ("perf test record+probe_libc_inet_pton: Fix call chain match on x86_64")
Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
---
 tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 4 ++++
 1 file changed, 4 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 47a26f2..09d7b0b 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -52,8 +52,12 @@ trace_libc_inet_pton_backtrace() {
 		echo "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected
 		echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
 		;;
+	x86_64)
+		eventattr='max-stack=3'
+		echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
 	*)
 		eventattr='max-stack=3'
+		echo "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected
 		echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
 		;;
 	esac
-- 
1.8.3.1


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

end of thread, other threads:[~2024-10-25 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15  7:53 [PATCH] perf/tests: fix record+probe_libc_inet_pton test on aarch64 Jing Zhang
2024-10-17 22:12 ` Namhyung Kim
2024-10-20 11:35   ` Leo Yan
2024-10-25 13:20     ` Leo Yan

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).