RFC perf tool: sys event metric support re-write
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest9 patches 27 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | perf metrics: Delete metricgroup_add_iter_data.tabletools/ | +2 | 1 reply | |
| 2/9 | perf metrics: Don't iter sys metrics if we already found a CPU matchtools/ | +7 | 4 replies | |
| 3/9 | perf metrics: Pass cpu and sys tables to metricgroup__add_metric()tools/ tools/ tools/ +2 more | +59 | 2 replies | |
| 4/9 | perf jevents: Add sys_events_find_events_table()tools/ tools/ tools/ | +20 | 17 replies | |
| 5/9 | perf pmu: Refactor pmu_add_sys_aliases_iter_fn()tools/ tools/ | +17 | 0 replies | |
| 6/9 | perf metrics: Add metricgroup_sys_metric_supported()tools/ | +105 | 0 replies | |
| 7/9 | perf metrics: Test metric match in metricgroup__sys_event_iter()tools/ | +6 | 0 replies | |
| 8/9 | perf metrics: Stop metricgroup__add_metric_sys_event_iter if already matchedtools/ | +6 | 0 replies | |
| 9/9 | perf vendor events arm64: Remove unnecessary metric Unit and Compat specifierstools/ tools/ tools/ +1 more | +0 | 0 replies |
Reviews trailers per patch
1 of 9 patches has a Reviewed-by or Acked-by.
| Patch | Ian Rogers |
|---|---|
| 1/9 | A-b |
| 2/9 | |
| 3/9 | |
| 4/9 | |
| 5/9 | |
| 6/9 | |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH RFC 0/9] perf tool: sys event metric support re-write
The current sys event metric support has some issues, like:
- It is broken that we only match a metric based on PMU compat, but not Unit as well, as reported by Jing Zhang <[email protected]>
- No real self-test support
- Not able to use resolvable metrics
- Need to specify event PMU Unit and Compat for metric, which should not be necessary
This series changes sys event metric support to match metrics based on evaluating each term in the metric expression and then ensuring it matches an event from the same associated pmu_sys_events table.
Why an RFC?
- Even though main motivation here was to improve self-test support, that has proved quite tricky and nothing has been added yet.
My desire is to test the feature that we match metrics for a specific SoC when PMUs with matching HW identifier are present. So I would hope to add sys metrics for many SoCs in ../pmu-events/arch/test/
- I still need to suppress logs from metricgroup_sys_metric_supported() indirect calls to functions like parse_events_multi_pmu_add(), generating logs like
"smmuv3_pmcg.wr_sent_sp -> smmuv3_pmcg_50/event=0x86/" - we should only see those logs for when really adding the metric in calling add_metric()
Based on 82fe2e45cdb0 (acme/tmp.perf/core, acme/tmp.perf-tools-next, acme/perf/core, acme/perf-tools-next) perf pmus: Check if we can encode the PMU number in perf_event_attr.type
John Garry (9):
perf metrics: Delete metricgroup_add_iter_data.table
perf metrics: Don't iter sys metrics if we already found a CPU match perf metrics: Pass cpu and sys tables to metricgroup__add_metric() perf jevents: Add sys_events_find_events_table()
perf pmu: Refactor pmu_add_sys_aliases_iter_fn()
perf metrics: Add metricgroup_sys_metric_supported()
perf metrics: Test metric match in metricgroup__sys_event_iter() perf metrics: Stop metricgroup__add_metric_sys_event_iter if already
matched
perf vendor events arm64: Remove unnecessary metric Unit and Compat
specifiers
.../arm64/freescale/imx8mm/sys/metrics.json | 4 - .../arm64/freescale/imx8mn/sys/metrics.json | 4 - .../arm64/freescale/imx8mq/sys/metrics.json | 4 - .../arm64/hisilicon/hip09/sys/uncore-cpa.json | 4 - tools/perf/pmu-events/empty-pmu-events.c | 6 + tools/perf/pmu-events/jevents.py | 11 ++ tools/perf/pmu-events/pmu-events.h | 3 + tools/perf/tests/expand-cgroup.c | 2 +- tools/perf/tests/parse-metric.c | 2 +- tools/perf/tests/pmu-events.c | 29 ++- tools/perf/util/metricgroup.c | 182 +++++++++++++++--- tools/perf/util/metricgroup.h | 3 +- tools/perf/util/pmu.c | 20 +- tools/perf/util/pmu.h | 2 + 14 files changed, 220 insertions(+), 56 deletions(-)
Signature · 7 lines
2.35.3 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel