]> git.baikalelectronics.ru Git - kernel.git/commit
perf metrics: Ensure at least 1 id per metric
authorIan Rogers <irogers@google.com>
Sat, 18 Jun 2022 01:39:57 +0000 (18:39 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 19 Jun 2022 14:24:05 +0000 (11:24 -0300)
commit035358736d80dd24ae633e07a32fa3c2f780f0d7
tree986d43dce09e9c904a00e80e6857d918070153d2
parent664e0c3a4a67cdec8ca4a2332b50ecedc184e988
perf metrics: Ensure at least 1 id per metric

We may have no events for a metric evaluated to a constant. In such a
case ensure a tool event is at least evaluated for metric parsing and
displaying.

Fixes: c76e5636c27b984a ("perf metrics: Don't add all tool events for sharing")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20220618013957.999321-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/metricgroup.c