linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Richter <tmricht@linux.ibm.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	acme@kernel.org, agordeev@linux.ibm.com, gor@linux.ibm.com,
	sumanthk@linux.ibm.com, hca@linux.ibm.com
Subject: Re: [PATCH] perf/test: perf test 86 fails on s390 repo linux-next
Date: Mon, 30 Sep 2024 14:30:39 +0200	[thread overview]
Message-ID: <3b65e3cc-2a9f-4427-a327-7e920ec4d969@linux.ibm.com> (raw)
In-Reply-To: <ZvXjYOWoEIhakz-f@google.com>

On 9/27/24 00:42, Namhyung Kim wrote:
> Hello,
> 
> On Mon, Sep 16, 2024 at 02:57:18PM +0200, Thomas Richter wrote:
>> 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)
> 
> Is it because of a kernel change?  What about old kernels then?
> 
>>
>>  #
>>
>> 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
> 
> Is it possible to make it this part conditional and only have it for the
> new kernels?
> 
> Thanks,
> Namhyung
> 
> 
>>

I think this is more related to glibc and has nothing to do with the kernel version.
It happened after I did a dnf update.

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH

Vorsitzender des Aufsichtsrats: Wolfgang Wendt

Geschäftsführung: David Faller

Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


  reply	other threads:[~2024-09-30 12:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-09-30 23:26     ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b65e3cc-2a9f-4427-a327-7e920ec4d969@linux.ibm.com \
    --to=tmricht@linux.ibm.com \
    --cc=acme@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=sumanthk@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).