Received: by 10.192.165.148 with SMTP id m20csp1616359imm; Wed, 25 Apr 2018 22:55:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ul3gQnLbOd9NifwyrV3tWoW+pfRHWDuNwmk/e3DiboCJ1KoUZ1s4FgUlqeZa9QkrFBIQq X-Received: by 10.99.107.65 with SMTP id g62mr25656623pgc.180.1524722101586; Wed, 25 Apr 2018 22:55:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524722101; cv=none; d=google.com; s=arc-20160816; b=r6sy4EUwlnuN5WIKECSNKo9I4UC22G0ekUPuqmaHkOXi/fpBvTYJT4G9ERQsgFXmLq XlZ/yY5jNes2FjO3oNdyywk1XJqc100qpS8v0yTQRP99QH5hiRjA+GsMXkFfY5CSP469 0dAtWEqZQqxofQzqoTRAHqzDfq/dTrODtnTnjiEuPMxb8bfu1pdE3NwaxuHwU0Gcuhoy rIf+CDDDDfXm7nJO9Irqk9sVonOgFYO+lLItzUQ6gw6aUH5djIDlaXfRxCfl7+UMctyg Ib+Ujj8Bm7GOAU3HdMyCHC/wzdopONf6fur2IB37eqwqVsy3cH4Ei6ZKIKUF6VSVOTlP vBNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=cQKjuYC8fiofxM065NTwzGJX25XjdT3Cn8fwuG6320k=; b=qCstn6lsH26HjYbvDNaSKwutehKp2lvQ+DX0ZQFMsPnzC/29yKmNc0tr4OHICaF0QY pY3QBhbTFzeQnV0k+I7SQMav0MEVKKiQ9uDxXIFY5Kp2irm/yAOCd1lzSlpko2CXmOzY jGXvmGul+fBWgdWcprzxXznDrDbXp2Df+dZ5zu0gtlbqHR/tCBs9Y2Tc17gVyPd4GDea RVOukv/8Q6keWotEhDSVajiirFWIyhti4eeJzRWU4R8qb7hT/b4uJzcFAYl6LFiVlLun i6ILmGWpjSXG9H49GgS0Ava4vVTHObuteMAFcfoAdNLIEWd/WHtYKUjoRnCROj4J6b1Y ++hg== 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 f3si15169334pgn.376.2018.04.25.22.54.47; Wed, 25 Apr 2018 22:55:01 -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 S1753272AbeDZFxR (ORCPT + 99 others); Thu, 26 Apr 2018 01:53:17 -0400 Received: from terminus.zytor.com ([198.137.202.136]:56551 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbeDZFxO (ORCPT ); Thu, 26 Apr 2018 01:53:14 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w3Q5qxHX1777051; Wed, 25 Apr 2018 22:52:59 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w3Q5qxm91777048; Wed, 25 Apr 2018 22:52:59 -0700 Date: Wed, 25 Apr 2018 22:52:59 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Thomas Richter Message-ID: Cc: heiko.carstens@de.ibm.com, tmricht@linux.ibm.com, jpmv27@aim.com, acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, schwidefsky@de.ibm.com, brueckner@linux.ibm.com Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, schwidefsky@de.ibm.com, brueckner@linux.ibm.com, heiko.carstens@de.ibm.com, jpmv27@aim.com, tmricht@linux.ibm.com, acme@redhat.com In-Reply-To: <20180423082428.7930-1-tmricht@linux.ibm.com> References: <20180423082428.7930-1-tmricht@linux.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf test: Adapt test case record+probe_libc_inet_pton.sh for s390 Git-Commit-ID: b31a8cc1a53dda3a33b6c9c62779869d4d5fc142 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b31a8cc1a53dda3a33b6c9c62779869d4d5fc142 Gitweb: https://git.kernel.org/tip/b31a8cc1a53dda3a33b6c9c62779869d4d5fc142 Author: Thomas Richter AuthorDate: Mon, 23 Apr 2018 10:24:28 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 23 Apr 2018 11:04:37 -0300 perf test: Adapt test case record+probe_libc_inet_pton.sh for s390 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 Fixes: 3d20c6246690 ("perf unwind: Unwind with libdw doesn't take symfs into account") 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 Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Martin Vuille Link: http://lkml.kernel.org/r/20180423082428.7930-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- 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'