Re: [RFC 00/13] perf: Add perf kwork

From: Paul A. Clarke
Date: Thu Jun 23 2022 - 10:26:19 EST


On Thu, Jun 23, 2022 at 09:02:45AM +0800, Yang Jihong wrote:
> On 2022/6/22 22:59, Paul A. Clarke wrote:
> > On Mon, Jun 13, 2022 at 05:45:52PM +0800, Yang Jihong wrote:
> > > Sometimes, we need to analyze time properties of kernel work such as irq,
> > > softirq, and workqueue, such as delay and running time of specific interrupts.
> > > Currently, these events have kernel tracepoints, but perf tool does not
> > > directly analyze the delay of these events
> > >
> > > The perf-kwork tool is used to trace time properties of kernel work
> > > (such as irq, softirq, and workqueue), including runtime, latency,
> > > and timehist, using the infrastructure in the perf tools to allow
> > > tracing extra targets
> > >
> > > test case:
> > >
> > > # perf kwork report
> > >
> > > Kwork Name | Cpu | Total Runtime | Frequency | Max runtime | Max runtime start | Max runtime end |
> > > ---------------------------------------------------------------------------------------------------------------------------
> > > (s)RCU:9 | 0007 | 3.488 ms | 1258 | 0.145 ms | 3398384.220013 s | 3398384.220157 s |
> > > (s)NET_RX:3 | 0003 | 1.866 ms | 156 | 0.042 ms | 3398385.629764 s | 3398385.629806 s |
> > > (s)TIMER:1 | 0000 | 1.799 ms | 117 | 0.055 ms | 3398385.568033 s | 3398385.568088 s |
> > > (w)0xffff9c66e563ee98 | 0006 | 1.561 ms | 5 | 0.351 ms | 3398384.060021 s | 3398384.060371 s |
> >
> > What units are used for "Frequency"? It would be helpful to include somewhere.

> This refers to the number of event in the trace period.

I see. I suggest changing the column heading to say that.
"Count", "Number of Events", "Occurrences", something like that.

"Frequency" is a count-per-time-unit, like hertz, which doesn't
match well here.

PC