RE: [PATCH RFC 06/10] perf,tools: option to set counter read interval
From: Liang, Kan
Date: Wed Sep 23 2015 - 15:08:09 EST
>
> kan.liang@xxxxxxxxx [kan.liang@xxxxxxxxx] wrote:
> | From: Kan Liang <kan.liang@xxxxxxxxx>
> |
> | Add a timer to read counter regularly. Option --counter-read-interval
> | can be used to set the interval.
> | Only read counter statistics at the beginning and the end is not enough.
> | Sometimes, we need fine granularity to do sophisticated analysis. For
> | example,10-20ms is required to do sophisticated bandwidth analysis.
> |
> | Signed-off-by: Kan Liang <kan.liang@xxxxxxxxx>
> | ---
> | tools/perf/Documentation/perf-record.txt | 8 +++++++
> | tools/perf/builtin-record.c | 37
> ++++++++++++++++++++++++++++++++
> | 2 files changed, 45 insertions(+)
> |
> | diff --git a/tools/perf/Documentation/perf-record.txt
> | b/tools/perf/Documentation/perf-record.txt
> | index 2e9ce77..c1d9024 100644
> | --- a/tools/perf/Documentation/perf-record.txt
> | +++ b/tools/perf/Documentation/perf-record.txt
> | @@ -308,6 +308,14 @@ This option sets the time out limit. The default
> value is 500 ms.
> | Record context switch events i.e. events of type PERF_RECORD_SWITCH
> | or PERF_RECORD_SWITCH_CPU_WIDE.
> |
> | +--counter-read-interval::
> | +Sets the interval to do counter read regularly. This option is only
> | +valid
>
> How about "Sets the interval at which the counter should be read"?
>
> | +with counter read event (:C). This option is disabled by default. It
> | +means that the event counter can only be read at the beginning and the
> end.
>
> Should this last sentence be: "When this option is disabled, the event
> counter can only be read at the beginning and the end?"
>
> | +This option could be used when we need fine granularity to do
> | +sophisticated analysis. For example, 10-20ms is required to do
> | +sophisticated memory bandwidth analysis.
>
> I guess this is independent of the sampling frequency (perf-record -F)?
>
> IOW, is the need for --counter-read-interval so we can sample at one
> frequency, but read the counter values/statistics at a different frequency?
Right, --counter-read-interval is independent of sampling freq.
If we set --counter-read-interval to 10ms, it will read counter every 10ms
no matter what sampling frequency is set.
Thanks,
Kan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/