Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3501362imm; Sun, 1 Jul 2018 23:36:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcWLUe+iL/Wi5YkV5HbbT0FkTei429PMdeM6v2oMiuh8I/8NW2VcmM62YwFHEHjRSn8mEBJ X-Received: by 2002:a62:642:: with SMTP id 63-v6mr24350999pfg.222.1530513399930; Sun, 01 Jul 2018 23:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530513399; cv=none; d=google.com; s=arc-20160816; b=ngeCX+MepafmhA959rrcx4IjTP6RhjqfUWF2URLg3uLn6ZH2G9yqtC1Xg5idw4HWfM /f7RhbSs9/AbLZla5JD+toC2nH1w9/3TSasiUOmIVD7Ihj7yx2NPDntJCid0g8tZlLNB Ie6/Kg0RQWmRaNGx/tn+17nZDlKjSvvk6NgvlyPNl4b/XXBrINFSKxr6QOWE8HqZmTEM dElPgvygdYOvymK2+oB5YdcTW+RzO0crWnjFzoGpXDjGz/Hy4qa5ZbxN8S8tQzKImYBG MjxzIrtumB/VHRCNOjwOpsTQfMkdmwRi7n2tyKiVAeScrNYJfwalpqwOeRwk3mQRJLAj EJ/w== 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 :organization:from:references:cc:to:subject :arc-authentication-results; bh=GmynOsDp6sree4wH28bAME+mMPE0eno6APvwcmgatCA=; b=XxlGzS6kDs2rtDPv9x7ZDhryAgGcf/LjSE4amiqnb+CbdmolnYACQBg3T8X+ZLMlkJ jv4JBrA387AuBYTezDFGCk8z9yIrr8jSegUVtPhOsqaU+/X0hRcy0OILxHewHwSPCmAI Cd76FYP4itUDZ0wgM8t9jRt3B9w4LBP8SgdxakHNqlfIGWd+IgCNcISOVI2eOdEEhWeH 1soxvfPMD3S78DUcy3okpmzVpDBitIBtov5L4dw8ccobfPrub8MNyc3z/yTNCPg+AfJe N5CMY9ILwxPOaPV3f4B43UME64zS57rQrDxfrfcgde5ajO1Ey/C7AjB1SA1kPXTFTRZc E7Lg== 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 l12-v6si15345124plc.215.2018.07.01.23.36.24; Sun, 01 Jul 2018 23:36:39 -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 S1753330AbeGBGSe (ORCPT + 99 others); Mon, 2 Jul 2018 02:18:34 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41862 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753247AbeGBGSb (ORCPT ); Mon, 2 Jul 2018 02:18:31 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w626E8uV117198 for ; Mon, 2 Jul 2018 02:18:31 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jybhunxbs-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 02 Jul 2018 02:18:30 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 2 Jul 2018 07:18:27 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 2 Jul 2018 07:18:23 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w626IMht41550056 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 2 Jul 2018 06:18:22 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E3A424C046; Mon, 2 Jul 2018 07:18:05 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3CB654C050; Mon, 2 Jul 2018 07:18:05 +0100 (BST) Received: from oc3784624756.ibm.com (unknown [9.152.212.95]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 2 Jul 2018 07:18:05 +0100 (BST) Subject: Re: [PATCH v2 1/4] perf test shell: Replace '|&' with '2>&1 |' to work with more shells To: Kim Phillips , Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Richter , Michael Petlan , =?UTF-8?Q?Hendrik_Br=c3=bcckner?= , Sandipan Das References: <20180629124633.0a9f4bea54b8d2c28f265de2@arm.com> From: Thomas-Mich Richter Organization: IBM Date: Mon, 2 Jul 2018 08:18:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180629124633.0a9f4bea54b8d2c28f265de2@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18070206-0008-0000-0000-0000024E9DCA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18070206-0009-0000-0000-000021B4A502 Message-Id: <4db9a273-1604-6f92-070c-b2779fbe4614@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-02_01:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807020073 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/29/2018 07:46 PM, Kim Phillips wrote: > Since we do not specify bash (and/or zsh) as a requirement, use the > standard error redirection that is more widely supported. > > BEFORE: > > $ sudo ./perf test -v 62 > 62: Check open filename arg using perf trace + vfs_getname: > --- start --- > test child forked, pid 27305 > ./tests/shell/trace+probe_vfs_getname.sh: 20: ./tests/shell/trace+probe_vfs_getname.sh: Syntax error: "&" unexpected > test child finished with -2 > ---- end ---- > Check open filename arg using perf trace + vfs_getname: Skip > > AFTER: > > $ sudo ./perf test -v 62 > 64: Check open filename arg using perf trace + vfs_getname : > --- start --- > test child forked, pid 23008 > Added new event: > probe:vfs_getname (on getname_flags:72 with pathname=result->name:string) > > You can now use it in all perf tools, such as: > > perf record -e probe:vfs_getname -aR sleep 1 > > 0.361 ( 0.008 ms): touch/23032 openat(dfd: CWD, filename: /tmp/temporary_file.VEh0n, flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 4 > test child finished with 0 > ---- end ---- > Check open filename arg using perf trace + vfs_getname: Ok > > Similar to commit 35435cd06081, with the same title. > > Cc: Arnaldo Carvalho de Melo > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Alexander Shishkin > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: Thomas Richter > Cc: Michael Petlan > Signed-off-by: Kim Phillips > --- > v2: indent terminal session logs with a space to avoid git-am parsing > '--- start ---' as the end of the description text. > > tools/perf/tests/shell/trace+probe_vfs_getname.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf/tests/shell/trace+probe_vfs_getname.sh > index 55ad9793d544..4ce276efe6b4 100755 > --- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh > +++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh > @@ -17,7 +17,7 @@ skip_if_no_perf_probe || exit 2 > file=$(mktemp /tmp/temporary_file.XXXXX) > > trace_open_vfs_getname() { > - evts=$(echo $(perf list syscalls:sys_enter_open* |& egrep 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/') | sed 's/ /,/') > + evts=$(echo $(perf list syscalls:sys_enter_open* 2>&1 | egrep 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/') | sed 's/ /,/') > perf trace -e $evts touch $file 2>&1 | \ > egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open(at)?\((dfd: +CWD, +)?filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$" > } > Applied and tested for s390. You have my tested by. -- Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany -- Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294