Re: [PATCH v9 00/13] Don't compute events that won't be used in a metric.

From: Arnaldo Carvalho de Melo
Date: Wed Sep 29 2021 - 12:51:30 EST


Em Wed, Sep 29, 2021 at 09:09:24AM -0700, Ian Rogers escreveu:
> On Wed, Sep 29, 2021 at 8:16 AM John Garry <john.garry@xxxxxxxxxx> wrote:
> >
> > On 23/09/2021 08:46, Ian Rogers wrote:
> > > For a metric like:
> > > EVENT1 if #smt_on else EVENT2
> > >
> > > currently EVENT1 and EVENT2 will be measured and then when the metric
> > > is reported EVENT1 or EVENT2 will be printed depending on the value
> > > from smt_on() during the expr parsing. Computing both events is
> > > unnecessary and can lead to multiplexing as discussed in this thread:
> > > https://lore.kernel.org/lkml/20201110100346.2527031-1-irogers@xxxxxxxxxx/
> > >
> > > This change modifies expression parsing so that constants are
> > > considered when building the set of ids (events) and only events not
> > > contributing to a constant value are measured.
> >
> > Based on some testing on my arm64 platform, no regression seen, so:
> >
> > Tested-by: John Garry <john.garry@xxxxxxxxxx>
>
> Awesome, much thanks Jiri, John, Andi for the reviews and testing!

Thanks, applied.

- Arnaldo