Re: [RFC PATCH v7 5/6] perf stat: Add retire latency print functions to print out at the very end of print out

From: Namhyung Kim
Date: Mon Apr 22 2024 - 16:02:31 EST


On Mon, Apr 22, 2024 at 12:55 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> On Tue, Apr 2, 2024 at 2:46 PM <weilin.wang@xxxxxxxxx> wrote:
> >
> > From: Weilin Wang <weilin.wang@xxxxxxxxx>
> >
> > Add print out functions so that users could read retire latency values.
> >
> > Example output:
> >
> > Performance counter stats for 'system wide':
> >
> > 25,717 MEM_INST_RETIRED.SPLIT_STORES # 2.2 % tma_split_stores
> > 28,365,080 CPU_CLK_UNHALTED.THREAD
> > 24.00 MEM_INST_RETIRED.SPLIT_STORES:p # 96 4
> >
> > 2.054365083 seconds time elapsed
> >
> > This output of retire latency data is in format:
> > <val> <event-name> # <sum> <count>.
>
> Nop, please follow the perf stat output format. It'd be
>
> <sum> <event-name> # ...
>
> Hmm.. maybe you don't need this at all as it'll have the event
> anyway (probably without the 'p' modifier like in the example
> above).
>
> Then I think you can just add a metric value saying the average
> latency in the comment area.
>
> Performance counter stats for 'system wide':
>
> 25,717 MEM_INST_RETIRED.SPLIT_STORES # 2.2 %
> tma_split_stores
> #
> 24.0 average latency

Sorry for the line wrapping. They should be in the same line.

Thanks,
Namhyung