]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
perf metric: Make compute_single function more precise
authorJiri Olsa <jolsa@kernel.org>
Sun, 19 Jul 2020 18:13:17 +0000 (20:13 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 30 Jul 2020 10:01:50 +0000 (07:01 -0300)
commitb81ef466ace6bf9bfd7e63a4c2bc89721ee0d495
tree5cefaa570215eee898c4bdbc3159af1afd46ff90
parentf6fb0960f920e3040088992f32bbceded7a74322
perf metric: Make compute_single function more precise

So far compute_single function relies on the fact, that there's only
single metric defined within evlist in all tests. In following patch we
will add test for metric group, so we need to be able to compute metric
by given name.

Adding the name argument to compute_single and iterating evlist and
evsel's expression to find the given metric.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200719181320.785305-17-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/parse-metric.c