public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* perf test for inet_pton probe fails to match stacktrace
@ 2024-11-22 21:35 Guilherme Amadio
  2024-11-24 10:50 ` Leo Yan
  0 siblings, 1 reply; 8+ messages in thread
From: Guilherme Amadio @ 2024-11-22 21:35 UTC (permalink / raw)
  To: linux-perf-users; +Cc: acme, namhyung

Hi Arnaldo, Namhyung,

I've had this test fail for me since a while, so I'm reporting below
in case we can find a good solution to fix it on my system without
breaking other OSs. The test that fails is this:

gentoo ~ # perf test -vF inet_pton
--- start ---
ping 303105 [029] 47754.974977: probe_libc:inet_pton: (7f70ca48feb7)
7f70ca48feb7 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
7f70ca4a2517 gaih_inet+0x112 (/usr/lib64/libc.so.6)
FAIL: expected backtrace entry ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" got "7f70ca4a2517 gaih_inet+0x112 (/usr/lib64/libc.so.6)"
---- end ----
 92: probe libc's inet_pton & backtrace it with ping                 : FAILED!
gentoo ~ # perf version
perf version 6.12

Here's why it fails. My stack traces has more than the test expects:

gentoo ~ # perf script | tac | sed -e /^ping/q | tac
ping  267392 [010] 42482.886216: probe_libc:inet_pton: (7f168d9b4eb7)
            7f168d9b4eb7 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
            7f168d9c7517 gaih_inet+0x112 (/usr/lib64/libc.so.6)
            7f168d9c8b73 getaddrinfo+0x133 (/usr/lib64/libc.so.6)
            55947171a518 [unknown] (/usr/bin/ping)
            7f168d8d6a72 __libc_start_call_main+0x7a (/usr/lib64/libc.so.6)
            7f168d8d6b29 __libc_start_main@@GLIBC_2.34+0x84 (/usr/lib64/libc.so.6)
            55947171ac55 [unknown] (/usr/bin/ping)

Likely this is due to how I compile glibc:
gentoo ~ # cat /var/db/pkg/sys-libs/glibc-2.40-r5/CFLAGS
-Og -march=native -Wl,--build-id -gdwarf-4 -fno-builtin-strlen -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer

If you could suggest a way to fix this, I'd appreciate it.

Best regards,
-Guilherme


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

end of thread, other threads:[~2024-11-26 18:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22 21:35 perf test for inet_pton probe fails to match stacktrace Guilherme Amadio
2024-11-24 10:50 ` Leo Yan
2024-11-25 13:12   ` Guilherme Amadio
2024-11-26  5:08     ` Namhyung Kim
2024-11-26 10:27       ` Leo Yan
2024-11-26 16:39         ` Arnaldo Carvalho de Melo
2024-11-26 18:27           ` Leo Yan
2024-11-26 16:27       ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox