RFC perf tools: Add support to reuse metric
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest10 patches 37 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | perf tools: Rename expr__add_id to expr__add_valtools/ tools/ tools/ +3 more | +9 | 3 replies | |
| 2/10 | perf tools: Add struct expr_parse_data to keep expr valuetools/ tools/ tools/ +1 more | +17 | 3 replies | |
| 3/10 | perf tools: Add expr__add_id functiontools/ tools/ tools/ | +25 | 2 replies | |
| 4/10 | perf tools: Change expr__get_id to return struct expr_parse_datatools/ tools/ tools/ | +14 | 1 reply | |
| 5/10 | perf tools: Add expr__del_id functiontools/ tools/ | +14 | 2 replies | |
| 6/10 | perf tools: Collect other metrics in struct egrouptools/ tools/ tools/ +1 more | +157 | 5 replies | |
| 7/10 | perf tools: Collect other metrics in struct metric_exprtools/ tools/ | +33 | 3 replies | |
| 8/10 | perf tools: Add other metrics to hash datatools/ tools/ tools/ | +60 | 2 replies | |
| 9/10 | perf tools: Compute other metricstools/ tools/ tools/ | +23 | 4 replies | |
| 10/10 | perf tests: Add cache_miss_cycles to metric parse testtools/ | +33 | 2 replies |
Reviews trailers per patch
3 of 10 patches have a Reviewed-by or Acked-by.
| Patch | Ian Rogers |
|---|---|
| 1/10 | |
| 2/10 | |
| 3/10 | A-b |
| 4/10 | A-b |
| 5/10 | |
| 6/10 | |
| 7/10 | |
| 8/10 | |
| 9/10 | |
| 10/10 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC 00/10] perf tools: Add support to reuse metric
hi,
this patchset is adding the support to reused metric in another metric. The metric needs to be referenced by 'metric:' prefix.
For example, to define IPC by using CPI with change like:
"BriefDescription": "Instructions Per Cycle (per Logical Processor)",
- "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
+ "MetricExpr": "1/metric:CPI",
"MetricGroup": "TopDownL1",
"MetricName": "IPC"I won't be able to find all the possible places we could use this at, so I wonder you guys (who was asking for this) would try it and come up with comments if there's something missing or we could already use it at some places.
It's based on Arnaldo's tmp.perf/core.
Also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/metric
thanks,
jirka
---
Jiri Olsa (10):
perf tools: Rename expr__add_id to expr__add_val
perf tools: Add struct expr_parse_data to keep expr value perf tools: Add expr__add_id function
perf tools: Change expr__get_id to return struct expr_parse_data perf tools: Add expr__del_id function
perf tools: Collect other metrics in struct egroup perf tools: Collect other metrics in struct metric_expr perf tools: Add other metrics to hash data
perf tools: Compute other metrics
perf tests: Add cache_miss_cycles to metric parse test
tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json | 2 +- tools/perf/tests/expr.c | 7 ++-- tools/perf/tests/parse-metric.c | 33 +++++++++++++++++ tools/perf/tests/pmu-events.c | 4 +-- tools/perf/util/expr.c | 115 +++++++++++++++++++++++++++++++++++++++++++++------------- tools/perf/util/expr.h | 24 +++++++++++-- tools/perf/util/expr.y | 34 ++++++++++++++---- tools/perf/util/metricgroup.c | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- tools/perf/util/metricgroup.h | 6 ++++ tools/perf/util/stat-shadow.c | 23 +++++++----- 10 files changed, 374 insertions(+), 61 deletions(-)