All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf/test: Fix perf test 84 on s390
@ 2022-12-13 10:37 Thomas Richter
  2022-12-13 10:37 ` [PATCH 2/2] perf/test: Fix perf test 89 on x86 Thomas Richter
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Richter @ 2022-12-13 10:37 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme, hca, gor, sumanthk
  Cc: svens, Thomas Richter

perf test '84: probe libc's inet_pton & backtrace it with ping'
fails on s390. Debugging revealed a changed stack trace for the
ping command using probes:

ping 35729 [002]  8006.365063: probe_libc:inet_pton: (3ff9603e7c0)
                  13e7c0 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
          --->    104371 text_to_binary_address+0xef1 (inlined)
                  104371 gaih_inet+0xef1 (inlined)
                  104371 __GI_getaddrinfo+0xef1 (inlined)
                    5d4b main+0x139b (/usr/bin/ping)

The line ---> text_to_binary_address ...
is new. It was introduced with glibc version 2.36.7.2 released
with Fedora 37 for s390.

Output before
 # ./perf test 84
 84: probe libc's inet_pton & backtrace it with ping   : FAILED!
 #

Output after:
 # ./perf test 84
 84: 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 | 1 +
 1 file changed, 1 insertion(+)

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 f12a4e217968..0f01c62cbee9 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -37,6 +37,7 @@ 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.38.1


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

* [PATCH 2/2] perf/test: Fix perf test 89 on x86
  2022-12-13 10:37 [PATCH 1/2] perf/test: Fix perf test 84 on s390 Thomas Richter
@ 2022-12-13 10:37 ` Thomas Richter
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Richter @ 2022-12-13 10:37 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme, hca, gor, sumanthk
  Cc: svens, Thomas Richter

From: Thomas Richter <richter@de.ibm.com>

perf test '89: probe libc's inet_pton & backtrace it with ping'
fails on x86. Debugging revealed a changed stack trace for the
ping command using probes:

ping 35729 [002]  8006.365063: probe_libc:inet_pton: (3ff9603e7c0)
                  12be50 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
                  4fca main+0x139b (/usr/bin/ping)

The line getaddrinfo.... in the call stack is gone.
It was introduced with glibc version 2.36.8 released
with Fedora 37.

Output before on x86
 # ./perf test 89
 89: probe libc's inet_pton & backtrace it with ping   : FAILED!
 #

Output after on x86:
 # ./perf test 89
 89: probe libc's inet_pton & backtrace it with ping   : Ok
 #

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

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 0f01c62cbee9..51ae8b906055 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -50,7 +50,6 @@ trace_libc_inet_pton_backtrace() {
 		;;
 	*)
 		eventattr='max-stack=3'
-		echo "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected
 		echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
 		;;
 	esac
-- 
2.38.1


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

* Re: [PATCH 2/2] perf/test: Fix perf test 89 on x86
  2022-12-14 10:40     ` Thomas Richter
@ 2022-12-14 14:34       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-12-14 14:34 UTC (permalink / raw)
  To: Thomas Richter; +Cc: linux-kernel, linux-perf-users, hca, gor, sumanthk, svens

Em Wed, Dec 14, 2022 at 11:40:32AM +0100, Thomas Richter escreveu:
> On 12/13/22 15:46, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Dec 13, 2022 at 11:57:29AM +0100, Thomas Richter escreveu:
> >> perf test '89: probe libc's inet_pton & backtrace it with ping'
> >> fails on x86. Debugging revealed a changed stack trace for the
> >> ping command using probes:

> >> ping 35729 [002]  8006.365063: probe_libc:inet_pton: (3ff9603e7c0)
> >>                   12be50 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
> >>                   4fca main+0x139b (/usr/bin/ping)

> >> The line getaddrinfo.... in the call stack is gone.
> >> It was introduced with glibc version 2.36.8 released
> >> with Fedora 37.

> >> Output before on x86
> >>  # ./perf test 89
> >>  89: probe libc's inet_pton & backtrace it with ping   : FAILED!
> >>  #

> >> Output after on x86:
> >>  # ./perf test 89
> >>  89: probe libc's inet_pton & backtrace it with ping   : Ok
> >>  #

> > Not having at the current state of that script, that $expected may be a
> > subset of the actual backtrace, i.e. will this continue working with
> > the systems where that getaddrinfo line appear?
 
> No, that is not the case.
> Taking this into account requires a larger rework of the call stack
> checking. Not just simple line by line matching which is done now.
> It also raises the question of how far to go back
> in glibc history. Different versions of glibc have different call stacks.
 
> I will rethink this...

One possibility is to have the options on a temp file, the previous one,
then if it fails, remove the getaddrinfo line and try again, if it
works, its the new glibc, test result is Ok.

Add a commment stating that from circa glibc versiuon 2.36.8 the
getaddrinfo isn't there anymore.

- Arnaldo

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

* Re: [PATCH 2/2] perf/test: Fix perf test 89 on x86
  2022-12-13 14:46   ` Arnaldo Carvalho de Melo
@ 2022-12-14 10:40     ` Thomas Richter
  2022-12-14 14:34       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Richter @ 2022-12-14 10:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, hca, gor, sumanthk, svens

On 12/13/22 15:46, Arnaldo Carvalho de Melo wrote:
> Em Tue, Dec 13, 2022 at 11:57:29AM +0100, Thomas Richter escreveu:
>> perf test '89: probe libc's inet_pton & backtrace it with ping'
>> fails on x86. Debugging revealed a changed stack trace for the
>> ping command using probes:
>>
>> ping 35729 [002]  8006.365063: probe_libc:inet_pton: (3ff9603e7c0)
>>                   12be50 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
>>                   4fca main+0x139b (/usr/bin/ping)
>>
>> The line getaddrinfo.... in the call stack is gone.
>> It was introduced with glibc version 2.36.8 released
>> with Fedora 37.
>>
>> Output before on x86
>>  # ./perf test 89
>>  89: probe libc's inet_pton & backtrace it with ping   : FAILED!
>>  #
>>
>> Output after on x86:
>>  # ./perf test 89
>>  89: probe libc's inet_pton & backtrace it with ping   : Ok
>>  #
> 
> Not having at the current state of that script, that $expected may be a
> subset of the actual backtrace, i.e. will this continue working with
> the systems where that getaddrinfo line appear?
> 
> - Arnaldo
>  

No, that is not the case.
Taking this into account requires a larger rework of the call stack
checking. Not just simple line by line matching which is done now.
It also raises the question of how far to go back
in glibc history. Different versions of glibc have different call stacks.

I will rethink this...
-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


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

* Re: [PATCH 2/2] perf/test: Fix perf test 89 on x86
  2022-12-13 10:57 ` [PATCH 2/2] perf/test: Fix perf test 89 on x86 Thomas Richter
@ 2022-12-13 14:46   ` Arnaldo Carvalho de Melo
  2022-12-14 10:40     ` Thomas Richter
  0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-12-13 14:46 UTC (permalink / raw)
  To: Thomas Richter; +Cc: linux-kernel, linux-perf-users, hca, gor, sumanthk, svens

Em Tue, Dec 13, 2022 at 11:57:29AM +0100, Thomas Richter escreveu:
> perf test '89: probe libc's inet_pton & backtrace it with ping'
> fails on x86. Debugging revealed a changed stack trace for the
> ping command using probes:
> 
> ping 35729 [002]  8006.365063: probe_libc:inet_pton: (3ff9603e7c0)
>                   12be50 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
>                   4fca main+0x139b (/usr/bin/ping)
> 
> The line getaddrinfo.... in the call stack is gone.
> It was introduced with glibc version 2.36.8 released
> with Fedora 37.
> 
> Output before on x86
>  # ./perf test 89
>  89: probe libc's inet_pton & backtrace it with ping   : FAILED!
>  #
> 
> Output after on x86:
>  # ./perf test 89
>  89: probe libc's inet_pton & backtrace it with ping   : Ok
>  #

Not having at the current state of that script, that $expected may be a
subset of the actual backtrace, i.e. will this continue working with
the systems where that getaddrinfo line appear?

- Arnaldo
 
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> ---
>  tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 1 -
>  1 file changed, 1 deletion(-)
> 
> 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 0f01c62cbee9..51ae8b906055 100755
> --- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
> +++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
> @@ -50,7 +50,6 @@ trace_libc_inet_pton_backtrace() {
>  		;;
>  	*)
>  		eventattr='max-stack=3'
> -		echo "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected
>  		echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
>  		;;
>  	esac
> -- 
> 2.38.1

-- 

- Arnaldo

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

* [PATCH 2/2] perf/test: Fix perf test 89 on x86
  2022-12-13 10:57 [PATCH 1/2] perf/test: Fix perf test 84 on s390 Thomas Richter
@ 2022-12-13 10:57 ` Thomas Richter
  2022-12-13 14:46   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Richter @ 2022-12-13 10:57 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme, hca, gor, sumanthk
  Cc: svens, Thomas Richter

perf test '89: probe libc's inet_pton & backtrace it with ping'
fails on x86. Debugging revealed a changed stack trace for the
ping command using probes:

ping 35729 [002]  8006.365063: probe_libc:inet_pton: (3ff9603e7c0)
                  12be50 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6)
                  4fca main+0x139b (/usr/bin/ping)

The line getaddrinfo.... in the call stack is gone.
It was introduced with glibc version 2.36.8 released
with Fedora 37.

Output before on x86
 # ./perf test 89
 89: probe libc's inet_pton & backtrace it with ping   : FAILED!
 #

Output after on x86:
 # ./perf test 89
 89: 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 | 1 -
 1 file changed, 1 deletion(-)

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 0f01c62cbee9..51ae8b906055 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -50,7 +50,6 @@ trace_libc_inet_pton_backtrace() {
 		;;
 	*)
 		eventattr='max-stack=3'
-		echo "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected
 		echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
 		;;
 	esac
-- 
2.38.1


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

end of thread, other threads:[~2022-12-14 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13 10:37 [PATCH 1/2] perf/test: Fix perf test 84 on s390 Thomas Richter
2022-12-13 10:37 ` [PATCH 2/2] perf/test: Fix perf test 89 on x86 Thomas Richter
2022-12-13 10:57 [PATCH 1/2] perf/test: Fix perf test 84 on s390 Thomas Richter
2022-12-13 10:57 ` [PATCH 2/2] perf/test: Fix perf test 89 on x86 Thomas Richter
2022-12-13 14:46   ` Arnaldo Carvalho de Melo
2022-12-14 10:40     ` Thomas Richter
2022-12-14 14:34       ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.