Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4892437imm; Fri, 18 May 2018 12:29:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZruMzzlLiPOeOh0ZEHEmRUqzb4rPMUzvZFhN3firzrZ2v0SWHNbJjvqgU6KIrrwkrjNAi5S X-Received: by 2002:a62:3f4e:: with SMTP id m75-v6mr10508677pfa.176.1526671753527; Fri, 18 May 2018 12:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526671753; cv=none; d=google.com; s=arc-20160816; b=SZDcV/EW8pMyXfYGTvBlS12SZQdjT/qJNDvCrPqy6m6F6HBuCHmAu3x6jxmModLW04 qMzCRR256l6RBn2gpSg544IYyterNbdfux4/I4biEa8e9yxVO9NmlaTt5wMH4xoQfnFo JNq5PEgEbv3EHRaxvpiIwCQ27fjaYezjGuTnCi140HR6SyNCx1V7dxXcgm+DchKc4+16 85VJHecssT11Q/XDHnfnqePa9e/9vI1msaNE++DC188cmlvnmhK0NbljrmPK+9VgbKb7 32QiU3WZJ3VOS18UuN5nNkOWGfkD1YyRqNQp6GattBq4QSBIKBRBlDQzrIUVzrlmuCpV U0jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=yeBdkOO/WuzTDJ6AnF6i9GefmE4kQ4AIu+IjZEoxnG8=; b=GpebJE6zvj2SKnrc1z6GutV3B9zohc1afetVu42KNiVmgr39vAijpHOA2nX3qhnrdR hzHmiXHW6hGDHkaVLljfXUuvieKqkqSy6zNyKq5/GzpIdaXhwGGcOG7khf3tb5RVt1lw xD8BXSZlBWPNWoxlcTTRUAlxFWk0T+KITfSuGAVzh/95gjoyWWkLZnOJHseKm5riefRi Iqai6JQQPjZCWfaS1rUQj4Au/z6IjuqkQGRYA4/qTm9S29GfNr1riJQ0eehV6yFX6xu7 lmwPUhto0ZhDsgTy53N4J3cLCy3QpRNsakQUHRk0N9GUbAxZdjCbjCWViX676hnNWn5o hRqA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13-v6si7641156plq.464.2018.05.18.12.28.58; Fri, 18 May 2018 12:29:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751846AbeERT2m (ORCPT + 99 others); Fri, 18 May 2018 15:28:42 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35026 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750763AbeERT2l (ORCPT ); Fri, 18 May 2018 15:28:41 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4IJO0DH075608 for ; Fri, 18 May 2018 15:28:40 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j22wada9r-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 18 May 2018 15:28:40 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 May 2018 20:28:39 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 18 May 2018 20:28:36 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4IJSYs74129052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 May 2018 19:28:35 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D80C94C04E; Fri, 18 May 2018 20:20:21 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 386964C04A; Fri, 18 May 2018 20:20:20 +0100 (BST) Received: from [9.195.32.110] (unknown [9.195.32.110]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 18 May 2018 20:20:19 +0100 (BST) Subject: Re: [PATCH] perf tests: Fix regex for record+probe_libc_inet_pton.sh To: Arnaldo Carvalho de Melo Cc: jolsa@redhat.com, linux-kernel@vger.kernel.org, ravi.bangoria@linux.ibm.com, naveen.n.rao@linux.vnet.ibm.com, tmricht@linux.ibm.com References: <20180518072417.1498-1-sandipan@linux.vnet.ibm.com> <20180518192102.GB5001@kernel.org> From: Sandipan Das Date: Sat, 19 May 2018 00:58:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180518192102.GB5001@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18051819-0008-0000-0000-000004F80A20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051819-0009-0000-0000-00001E8C8996 Message-Id: <80d65e5c-40d7-b0a8-6f6f-c0ddb4cbb77c@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-18_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805180204 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, On 05/19/2018 12:51 AM, Arnaldo Carvalho de Melo wrote: > Em Fri, May 18, 2018 at 12:54:17PM +0530, Sandipan Das escreveu: >> This test currently fails because the regular expressions for >> matching the output of perf script do not consider the symbol >> offsets to be part of the output. >> >> The symbol offsets are seen because of the default behaviour >> introduced by commit 4140d2ea74b3 ("perf script: Show symbol >> offsets by default"). >> >> Before applying this patch: >> >> # perf test -v "probe libc's inet_pton & backtrace it with ping" >> >> 62: probe libc's inet_pton & backtrace it with ping : >> --- start --- >> test child forked, pid 30389 >> ping 30406 [002] 307144.280983: probe_libc:inet_pton: (7f4117adf220) >> 7f4117adf220 __GI___inet_pton+0x0 (/usr/lib64/libc-2.25.so) >> FAIL: expected backtrace entry 1 ".*inet_pton[[:space:]]\(/usr/lib64/libc-2.25.so|inlined\)$" got "7f4117adf220 __GI___inet_pton+0x0 (/usr/lib64/libc-2.25.so)" >> test child finished with -1 >> ---- end ---- >> probe libc's inet_pton & backtrace it with ping: FAILED! >> >> After applying this patch: >> >> # perf test -v "probe libc's inet_pton & backtrace it with ping" >> >> 62: probe libc's inet_pton & backtrace it with ping : >> --- start --- >> test child forked, pid 30539 >> ping 30556 [003] 307254.313217: probe_libc:inet_pton: (7fe19ab10220) >> 7fe19ab10220 __GI___inet_pton+0x0 (/usr/lib64/libc-2.25.so) >> 7fe19aad5ebd getaddrinfo+0x11d (/usr/lib64/libc-2.25.so) >> 56351e3c1c71 main+0x891 (/usr/bin/ping) >> test child finished with 0 >> ---- end ---- >> probe libc's inet_pton & backtrace it with ping: Ok > > Here it went from failing with: > > [root@seventh ~]# perf test -v pton > 64: probe libc's inet_pton & backtrace it with ping : > --- start --- > test child forked, pid 22590 > ping 22607 [001] 12782.425689: probe_libc:inet_pton: (7f8686da4e40) > 7f8686da4e40 __GI___inet_pton+0x0 (/usr/lib64/libc-2.26.so) > FAIL: expected backtrace entry 1 ".*inet_pton[[:space:]]\(/usr/lib64/libc-2.26.so|inlined\)$" got "7f8686da4e40 __GI___inet_pton+0x0 (/usr/lib64/libc-2.26.so)" > test child finished with -1 > ---- end ---- > probe libc's inet_pton & backtrace it with ping: FAILED! > [root@seventh ~]# > > To failing with: > > [root@seventh ~]# perf test -v pton > 64: probe libc's inet_pton & backtrace it with ping : > --- start --- > test child forked, pid 28954 > ping 28971 [002] 14277.711200: probe_libc:inet_pton: (7fc9d66e3e40) > 7fc9d66e3e40 __GI___inet_pton+0x0 (/usr/lib64/libc-2.26.so) > 7fc9d66b02b4 getaddrinfo+0x124 (/usr/lib64/libc-2.26.so) > 56075cb98f40 [unknown] (/usr/bin/ping) > FAIL: expected backtrace entry 3 ".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" got "56075cb98f40 [unknown] (/usr/bin/ping)" > test child finished with -1 > ---- end ---- > probe libc's inet_pton & backtrace it with ping: FAILED! > [root@seventh ~]# > > Trying to figure this out... > Looks like perf failed to resolve the symbol's name for the last entry in the callchain. I did not consider this case. So, if this happens, we would be better off using the original regex for the last line: expected[3]=".*\(.*/bin/ping.*\)$" - Sandipan