[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <79790803-8f2e-7fca-d9d9-9c45363ab96c@huawei.com>
Date: Thu, 14 Jan 2021 15:29:52 +0800
From: Bixuan Cui <cuibixuan@...wei.com>
To: Alexei Budankov <abudankov@...wei.com>, <peterz@...radead.org>,
<mingo@...hat.com>, <acme@...nel.org>, <mark.rutland@....com>,
<alexander.shishkin@...ux.intel.com>, <jolsa@...hat.com>,
<namhyung@...nel.org>, <linux-kernel@...r.kernel.org>
CC: <john.wanghui@...wei.com>
Subject: Re: [PATCH 1/2] perf tools: add 'perf irq' to measure the hardware
interrupts
On 2021/1/13 3:50, Alexei Budankov wrote:
> Hi Bixuan,
>
> On 12.01.2021 15:55, Bixuan Cui wrote:
>> Add 'perf irq' to trace/measure the hardware interrupts.
>>
>> Now three functions are provided:
>> 1. 'perf irq record <command>' to record the irq handler events.
>> 2. 'perf irq script' to see a detailed trace of the workload that
>> was recorded.
>> 3. 'perf irq timeconsume' to calculate the time consumed by each
>> hardware interrupt processing function.
>>
>> Signed-off-by: Bixuan Cui <cuibixuan@...wei.com>
> Thanks for the patches. There is still something that could be improved.
>
>> ---
>> tools/perf/Build | 1 +
>> tools/perf/builtin-irq.c | 288 +++++++++++++++++++++++++++++++++++++++
>> tools/perf/builtin.h | 1 +
>> tools/perf/perf.c | 1 +
>> 4 files changed, 291 insertions(+)
>> create mode 100644 tools/perf/builtin-irq.c
>>
> <SNIP>
>
>> +
>> +static int __cmd_record(int argc, const char **argv)
>> +{
>> + unsigned int rec_argc, i, j;
>> + const char **rec_argv;
>> + const char * const record_args[] = {
>> + "record",
>> + "-a",
> I see it works also like this:
>
> sudo perf record -p PID -c 1 -e irq:irq_handler_entry,irq:irq_handler_exit
> sudo perf record -R -c 1 -e irq:irq_handler_entry,irq:irq_handler_exit -- find /
>
> This -a option jointly with -p option could be made configurable from
> the command line for perf irq mode.
That's true. We can add a series of commands for 'perf irq',such as record, script and report.
So I kept the 'perf irq record'.
>
>> + "-R",
>> + "-m", "1024",
> Do you see data losses with default buffer size of 512KB
> when capturing trace in your specific use case?
>
> If not then this -m could be avoided or made configurable
> if you still need it.
Thank you for your advice, I will delete it.
Powered by blists - more mailing lists