Re: [PATCH v7 5/5] perf metric: Don't compute unused events.

2021-01-15 Thread Jiri Olsa
On Tue, Jan 12, 2021 at 03:04:34PM -0800, 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

[PATCH v7 5/5] perf metric: Don't compute unused events.

2021-01-12 Thread Ian Rogers
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 d