Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp13737pxb; Fri, 15 Jan 2021 06:38:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtigvF/g7NtAJ05JvrAM6X27Yz5swYxOZx5EBtb/sswQ6KL8zt/vtono4a7NlF9l5xt/mq X-Received: by 2002:a17:906:c7d9:: with SMTP id dc25mr9247663ejb.138.1610721494731; Fri, 15 Jan 2021 06:38:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610721494; cv=none; d=google.com; s=arc-20160816; b=LILMg/50mkNpBFGYl+38eu5DulhOThXX0f6kW/k2n0i2Z4ysSD8SVtOzepmm5WPH3T yG7l+/D/A1gqNxxwrbIxjkITlPha1RpK6JiI6X/4GFeiUQ2ojGzTsybUAMUDFkVk8mzJ B1+mdGTlH1/WYBDovcmQlYlYkryI8xp0SenwrDwr2n2vVqCmG1grKAu6N7ZuOegqnBgP D94Jxo3iKQy8PuTYmC5j7tf2jOqieuz6WtGIwuu5ZhZlYRGediEjYevgX6mt6rhuHoQ0 KBBbw2ai5Ixuolx39jl7qQYxtISGzA7LRbP/IkJsuTAFBHP5920eLdwPbJOzKlFWaMxy rSZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=WIJ6sM2tgOPEqIqTs0EIrXmFuj21/lLS4xOKzzcyVcI=; b=U4auqHSX/WNyswthxDP7sVxlKQ65alWplZ5JLJfq2XzA7BkcV/brWh67sqR0GB+tDF LZ2CjbJ9tRYBoXINkDink4jg9tA9LcLq4YXcojkCVN7ddg+0MAC3f6qgwF5lXdJL78rQ O6BU1B7Ic2OjUXZFqxweuhVYXQPvURXqTu1u3w6n9ApI9OAZghKLNwHFOD6wQaVuVl7h QHn2w2d/HwqQRC8X+vc0ul1qXMlpp+Q5BrjhP9+bhpT5/F/JNtebHdHKd/TTqQLUsg2o mkl7KPftCXNlrGJK36WbnDN7NwYMMmhbwhHZPfnah0537MWS35stv8ZtsEFJ4x/+JH+y PjaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk16si3803571ejb.8.2021.01.15.06.37.50; Fri, 15 Jan 2021 06:38:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732703AbhAOOgv (ORCPT + 99 others); Fri, 15 Jan 2021 09:36:51 -0500 Received: from mga02.intel.com ([134.134.136.20]:7609 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731576AbhAOOgu (ORCPT ); Fri, 15 Jan 2021 09:36:50 -0500 IronPort-SDR: gjHZIlOCddXYaurNM9Kjmg87YbKOH1MfruPil6OgMSAmZzTIc3AA3kdU+D9JbpRV87nnTpk3zc vkHWXG7XqwZw== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="165640361" X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="165640361" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 06:35:04 -0800 IronPort-SDR: ATa+yG739o+UtxOSWB/MgrBB0TUM9LSfvWVeKqlrrE5nVfKvCtSMtNC35DvNZsEjGIQxu8qKy+ gC/zzNxfiqTg== X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="382682114" Received: from aantonov-mobl.ccr.corp.intel.com (HELO [10.249.226.58]) ([10.249.226.58]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 06:35:02 -0800 Subject: Re: [PATCH v2 5/6] perf stat: Enable iiostat mode for x86 platforms To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , linux-kernel , Jiri Olsa , Andi Kleen , Alexander Shishkin , Mark Rutland , Ian Rogers , Ingo Molnar , Peter Zijlstra References: <20201223130320.3930-1-alexander.antonov@linux.intel.com> <20201223130320.3930-6-alexander.antonov@linux.intel.com> <358dd76f-c6ec-b894-14be-659df0802c87@linux.intel.com> <20f98862-9087-0368-7124-19a8f2b54db9@linux.intel.com> From: Alexander Antonov Message-ID: <913f2743-b5dd-f7e0-1bd0-d3c1d2ad1c7c@linux.intel.com> Date: Fri, 15 Jan 2021 17:34:59 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/15/2021 10:33 AM, Namhyung Kim wrote: > On Fri, Jan 15, 2021 at 1:41 AM Alexander Antonov > wrote: >> On 1/14/2021 6:39 AM, Namhyung Kim wrote: >>> On Wed, Jan 13, 2021 at 9:08 PM Alexander Antonov >>> wrote: >>>> On 1/6/2021 12:02 PM, Namhyung Kim wrote: >>>>> On Wed, Dec 23, 2020 at 10:03 PM Alexander Antonov >>>>>> diff --git a/tools/perf/perf-iiostat.sh b/tools/perf/perf-iiostat.sh >>>>>> new file mode 100644 >>>>>> index 000000000000..2c5168d2550b >>>>>> --- /dev/null >>>>>> +++ b/tools/perf/perf-iiostat.sh >>>>>> @@ -0,0 +1,12 @@ >>>>>> +#!/bin/bash >>>>>> +# SPDX-License-Identifier: GPL-2.0 >>>>>> +# perf iiostat >>>>>> +# Alexander Antonov >>>>>> + >>>>>> +if [[ "$1" == "show" ]] || [[ "$1" =~ ([a-f0-9A-F]{1,}):([a-f0-9A-F]{1,2})(,)? ]]; then >>>>>> + DELIMITER="=" >>>>>> +else >>>>>> + DELIMITER=" " >>>>>> +fi >>>>>> + >>>>>> +perf stat --iiostat$DELIMITER$* >>>>> Why is this needed? >>>>> >>>>> Thanks, >>>>> Namhyung >>>> Arnaldo raised question relates to format of 'perf stat --iiostat' >>>> subcommand >>>> and explained how it can be changed to 'perf iiostat' through the aliases >>>> mechanism in perf. >>> Yeah, I know that. What I'm asking is the DELIMITER part. >>> >>> Thanks, >>> Namhyung >> I'm using DELIMITER to resolve two different cases for format of iiostat >> command: >> The first one is the command with an option for iiostat mode, for example: >> 'perf iiostat show' which should be converted to 'perf stat >> --iiostat=show' or >> 'perf iiostat 0000:ae,0000:5d' to 'perf stat --iiostat=0000:ae,0000:5d'. >> The second is the command without any option for iiostat: 'perf iiostat >> -I 1000' >> should be converted to 'perf stat --iiostat -I 1000'. > Can't we simply use a whitespace ? We need to use the equal sign to pass arguments to iiostat mode. Thanks, Alexander