[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03316fe6-f59b-9911-67e0-2841bb79cac7@huawei.com>
Date: Tue, 12 Jan 2021 22:50:57 +0300
From: Alexei Budankov <abudankov@...wei.com>
To: Bixuan Cui <cuibixuan@...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>, <abudankov@...wei.com>
Subject: Re: [PATCH 1/2] perf tools: add 'perf irq' to measure the hardware
interrupts
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.
> + "-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.
Regards,
Alexei
Powered by blists - more mailing lists