Received: by 10.192.165.156 with SMTP id m28csp1945942imm; Thu, 12 Apr 2018 06:17:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/XvHqCKCc/fxBOXX/yuNhpTdmHAeir5nKySh9+9DPXiq3+84SaXMOvuToqJjU3KaypDVp7 X-Received: by 10.99.177.9 with SMTP id r9mr723387pgf.60.1523539038822; Thu, 12 Apr 2018 06:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523539038; cv=none; d=google.com; s=arc-20160816; b=Sfb+fHhC8cLmnn0X42MFcc43Y8XIgQlsEUTxLBMzWav4XoFyGBr7Q+h2kzz+d143/5 bJ08+ppUcekQ64dewN1BY65DYeqBRuyytbqcAn+pZDgKA5vWiN/LuJS+O6lcB9F7ARQN PY6NTbFNQp2sFs3OsI0Uh2opj8gR3Zf0p5Y2Ztrd+RCaCuANXeCiPM3SRZO2Q+cCmacx ZfpykcpU62hh/6nzO2qbXasbm3Hy3UPhpVCal87lIKkx92mqmBAq/7kZ002EMN9GCUN2 Mp2eLotsOK7nnFfblKDqWf9WOShGBhe55RIyHwJUXwghIJMGYT83wCfCovvgq7VdbnMt /Fhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=CfF8hAhTxG+UrcGgYi10Gmz59hw/Z3TX9lsqj9Y6xxw=; b=eqKVunrLUI745hMvSZnVV0D6MhXtCSXgGx16nqb9zkLxyPNdkbMvFaocyAPlRmAPhA aE0V/DCLOIphamnNLfQU/mfr2P1TrmgiGP4h7zSV663Fe8ptOfOVZl7p5w/OYpCNbSmZ Do/DG7C7BGCxB5m1uMjEjngjG7nOKI0lnZ8D8Azjw5uWXTYhZX1WHcptU09tdPy6usry BgjyaryZZnimdoYup0s/KGfL1FNoQ3eyvLiCa1izGAcdPUozmuN+TpvJtsAfVxCKaDJW tqeqJ0m/N+8lyj1Q35PLry5lYghK0eiDFIBzhQ7WXIJkzYyLzKlLCtPyvZIavegMls/7 jWfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j33-v6si3305493pld.395.2018.04.12.06.16.41; Thu, 12 Apr 2018 06:17:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752965AbeDLNKU (ORCPT + 99 others); Thu, 12 Apr 2018 09:10:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:46882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752693AbeDLNKS (ORCPT ); Thu, 12 Apr 2018 09:10:18 -0400 Received: from jouet.infradead.org (unknown [177.79.82.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8A581217A6; Thu, 12 Apr 2018 13:10:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A581217A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Received: by jouet.infradead.org (Postfix, from userid 1000) id 7DD151452AE; Thu, 12 Apr 2018 10:10:12 -0300 (-03) Date: Thu, 12 Apr 2018 10:10:12 -0300 From: Arnaldo Carvalho de Melo To: Martin Vuille , Thomas Richter Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Subject: Re: [PATCH] perf test: Adapt test case record+probe_libc_inet_pton.sh for s390 Message-ID: <20180412131012.GC9818@kernel.org> References: <20180412081959.85193-1-tmricht@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180412081959.85193-1-tmricht@linux.ibm.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Apr 12, 2018 at 10:19:59AM +0200, Thomas Richter escreveu: > perf test case 58 (record+probe_libc_inet_pton.sh) > executed on s390x using kernel 4.16.0rc3 > displays this result: > # ./perf trace --no-syscalls > -e probe_libc:inet_pton/call-graph=dwarf/ ping -6 -c 1 ::1 > probe_libc:inet_pton: (3ffa0240448) > __GI___inet_pton (/usr/lib64/libc-2.26.so) > gaih_inet (inlined) > __GI_getaddrinfo (inlined) > main (/usr/bin/ping) > __libc_start_main (/usr/lib64/libc-2.26.so) > _start (/usr/bin/ping) > > After I installed kernel 4.16.0 the same tests uses > commands > # perf record -e probe_libc:inet_pton/call-graph=dwarf/ > -o /tmp/perf.data.abc ping -6 -c 1 ::1 > # perf script -i /tmp/perf.data.abc > and displays: > ping 39048 [006] 84230.381198: probe_libc:inet_pton: (3ffa0240448) > 140448 __GI___inet_pton (/usr/lib64/libc-2.26.so) > fbde1 gaih_inet (inlined) > fe2b9 __GI_getaddrinfo (inlined) > 398d main (/usr/bin/ping) > > Nothing else changed including glibc elfutils and other libraries > picked up by the build. > The entries for __libc_start_main and _start are missing. > > I bisected missing __libc_start_main and _start to commit > 3d20c6246690219881786de10d2dda93f616d0ac > ("perf unwind: Unwind with libdw doesn't take symfs into account") You forgot to add the author of that changeset to the CC list. Doing so will give him the chance to look at this unintended consequence of his work and maybe allow him to comment on your fix or provide an alternative solution. I've added him to the CC list now, Martin, can you please comment on this? - Arnaldo > When I undo this commit I get this call stack on s390: > [root@s35lp76 perf]# ./perf script -i /tmp/perf.data.abc > ping 39048 [006] 84230.381198: probe_libc:inet_pton: (3ffa0240448) > 140448 __GI___inet_pton (/usr/lib64/libc-2.26.so) > fbde1 gaih_inet (inlined) > fe2b9 __GI_getaddrinfo (inlined) > 398d main (/usr/bin/ping) > 22fbd __libc_start_main (/usr/lib64/libc-2.26.so) > 457b _start (/usr/bin/ping) > > Looks like dwarf functions dwfl_xxx create different call back > stack trace when using file > /usr/lib/debug/usr/bin/ping-20161105-7.fc27.s390x.debug instead of > file /usr/bin/ping. > > Fix this test case on s390 and do not expect any call back stack > entry after the main() function. Also be more robust and accept a > leading __GI_ prefix in front of getaddrinfo. > > On x86 this test case shows the same call stack using > both kernel versions 4.16.0rc3 and 4.16.0 and also > stops at main: > > [root@f27 perf]# ./perf script -i /tmp/perf.data.tmr > ping 4446 [000] 172.027088: probe_libc:inet_pton: (7fdfa08c93c0) > 1393c0 __GI___inet_pton (/usr/lib64/libc-2.26.so) > fe60d getaddrinfo (/usr/lib64/libc-2.26.so) > 2f40 main (/usr/bin/ping) > > [root@f27 perf]# > > Signed-off-by: Thomas Richter > Reviewed-by: Hendrik Brueckner > --- > tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > 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 1ecc1f0ff84a..016882dbbc16 100755 > --- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh > +++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh > @@ -19,12 +19,10 @@ trace_libc_inet_pton_backtrace() { > expected[1]=".*inet_pton[[:space:]]\($libc\)$" > case "$(uname -m)" in > s390x) > - eventattr='call-graph=dwarf' > + eventattr='call-graph=dwarf,max-stack=4' > expected[2]="gaih_inet.*[[:space:]]\($libc|inlined\)$" > - expected[3]="__GI_getaddrinfo[[:space:]]\($libc|inlined\)$" > + expected[3]="(__GI_)?getaddrinfo[[:space:]]\($libc|inlined\)$" > expected[4]="main[[:space:]]\(.*/bin/ping.*\)$" > - expected[5]="__libc_start_main[[:space:]]\($libc\)$" > - expected[6]="_start[[:space:]]\(.*/bin/ping.*\)$" > ;; > *) > eventattr='max-stack=3' > -- > 2.14.3