From: Alexander Antonov <alexander.antonov@linux.intel.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Jiri Olsa <jolsa@redhat.com>, Andi Kleen <ak@linux.intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v2 5/6] perf stat: Enable iiostat mode for x86 platforms
Date: Fri, 15 Jan 2021 17:34:59 +0300 [thread overview]
Message-ID: <913f2743-b5dd-f7e0-1bd0-d3c1d2ad1c7c@linux.intel.com> (raw)
In-Reply-To: <CAM9d7cjueVS_MJZxuADi-xw=EWXgncZ++jGDewamxZF8CkvhRw@mail.gmail.com>
On 1/15/2021 10:33 AM, Namhyung Kim wrote:
> On Fri, Jan 15, 2021 at 1:41 AM Alexander Antonov
> <alexander.antonov@linux.intel.com> wrote:
>> On 1/14/2021 6:39 AM, Namhyung Kim wrote:
>>> On Wed, Jan 13, 2021 at 9:08 PM Alexander Antonov
>>> <alexander.antonov@linux.intel.com> 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 <alexander.antonov@linux.intel.com>
>>>>>> +
>>>>>> +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
next prev parent reply other threads:[~2021-01-15 14:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 13:03 [PATCH v2 0/6] perf stat: Introduce iiostat mode to provide I/O performance metrics Alexander Antonov
2020-12-23 13:03 ` [PATCH v2 1/6] perf stat: Add AGGR_IIO_STACK mode Alexander Antonov
2020-12-23 13:03 ` [PATCH v2 2/6] perf evsel: Introduce an observed performance device Alexander Antonov
2021-01-06 8:44 ` Namhyung Kim
2021-01-13 11:13 ` Alexander Antonov
2020-12-23 13:03 ` [PATCH v2 3/6] perf stat: Basic support for iiostat in perf Alexander Antonov
2021-01-06 8:56 ` Namhyung Kim
2021-01-13 11:34 ` Alexander Antonov
2021-01-14 3:34 ` Namhyung Kim
2021-01-14 16:30 ` Alexander Antonov
2020-12-23 13:03 ` [PATCH v2 4/6] perf stat: Helper functions for IIO stacks list in iiostat mode Alexander Antonov
2020-12-23 13:03 ` [PATCH v2 5/6] perf stat: Enable iiostat mode for x86 platforms Alexander Antonov
2021-01-06 9:02 ` Namhyung Kim
2021-01-13 12:08 ` Alexander Antonov
2021-01-14 3:39 ` Namhyung Kim
2021-01-14 16:41 ` Alexander Antonov
2021-01-15 7:33 ` Namhyung Kim
2021-01-15 14:34 ` Alexander Antonov [this message]
2020-12-23 13:03 ` [PATCH v2 6/6] perf: Update .gitignore file Alexander Antonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=913f2743-b5dd-f7e0-1bd0-d3c1d2ad1c7c@linux.intel.com \
--to=alexander.antonov@linux.intel.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).