diff options
author | Jiri Olsa <jolsa@kernel.org> | 2020-07-19 20:13:10 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-30 12:01:49 +0200 |
commit | 4ea2896715e6743ea79426106f3d078d78a80f9f (patch) | |
tree | 9c7f5ef284779d5cda6390b310ddc4a5bb1ea77e /tools/perf/util/metricgroup.h | |
parent | perf metric: Collect referenced metrics in struct metric_ref_node (diff) | |
download | linux-4ea2896715e6743ea79426106f3d078d78a80f9f.tar.xz linux-4ea2896715e6743ea79426106f3d078d78a80f9f.zip |
perf metric: Collect referenced metrics in struct metric_expr
Add referenced metrics into struct metric_expr object, so they are
accessible when computing the metric.
Storing just name and expression itself, so the metric can be resolved
and computed.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: John Garry <john.garry@huawei.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-10-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/metricgroup.h')
-rw-r--r-- | tools/perf/util/metricgroup.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/metricgroup.h b/tools/perf/util/metricgroup.h index 8315bd1a7da4..62623a39cbec 100644 --- a/tools/perf/util/metricgroup.h +++ b/tools/perf/util/metricgroup.h @@ -18,12 +18,18 @@ struct metric_event { struct list_head head; /* list of metric_expr */ }; +struct metric_ref { + const char *metric_name; + const char *metric_expr; +}; + struct metric_expr { struct list_head nd; const char *metric_expr; const char *metric_name; const char *metric_unit; struct evsel **metric_events; + struct metric_ref *metric_refs; int runtime; }; |