perf metric: Collect referenced metrics in struct metric_ref_node
authorJiri Olsa <jolsa@kernel.org>
Sun, 19 Jul 2020 18:13:09 +0000 (20:13 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 30 Jul 2020 10:01:49 +0000 (07:01 -0300)
commit83de0b7d535deeffcbea2f1c3defce912e0206a7
tree88796a77b0b9ee79776dba0823937459f6dba531
parente7e1badd80282ff7ee07a5176f0620f57c798934
perf metric: Collect referenced metrics in struct metric_ref_node

Collecting referenced metrics in struct metric_ref_node object,
so we can process them later on.

The change will parse nested metric names out of expression and
'resolve' them.

All referenced metrics are dissolved into one context, meaning all
nested metrics events and added to the parent context.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
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-9-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/metricgroup.c