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

2020-11-22 Thread Andi Kleen
> +| expr '|' expr > +{ > + if (!compute_ids || (isfinite($1.val) && isfinite($3.val))) { > + assert($1.ids == NULL); > + assert($3.ids == NULL); > + $$.val = (long)$1.val | (long)$3.val; > + $$.ids = NULL; > + } else { > + /* > +

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

2020-11-20 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