[PATCHv2 00/13] perf tests: Add metrics tests
From: Jiri Olsa
Date: Tue Jun 02 2020 - 07:51:07 EST
hi,
changes for using metric result in another metric seem
to change lot of core metric code, so it's better we
have some more tests before we do that.
v2 changes:
- some of the patches got accepted
- add missing free to patch 1 [Ian]
- factor pmu-events test functions and reuse it in the new test [Ian]
- add fake_pmu bool to parse_events interface [Ian]
- simplify metric tests
- use proper cover letter subject ;-)
I actually reworked the 2 patches Ian acked so far,
so I did not add them.
Also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/metric_test
thanks,
jirka
---
Jiri Olsa (13):
perf tools: Add fake pmu support
perf tools: Add fake_pmu bool to parse_events interface
perf tests: Factor check_parse_id function
perf tests: Add another metric parsing test
perf tools: Factor out parse_groups function
perf tools: Add fake_pmu to parse_events function
perf tools: Add map to parse_events function
perf tools: Add metricgroup__parse_groups_test function
perf tools: Factor out prepare_metric function
perf tools: Release metric_events rblist
perf tools: Add test_generic_metric function
perf tests: Add parse metric test for ipc metric
perf tests: Add parse metric test for frontend metric
tools/perf/arch/arm/util/cs-etm.c | 2 +-
tools/perf/arch/arm64/util/arm-spe.c | 2 +-
tools/perf/arch/powerpc/util/kvm-stat.c | 2 +-
tools/perf/arch/x86/tests/intel-cqm.c | 2 +-
tools/perf/arch/x86/tests/perf-time-to-tsc.c | 2 +-
tools/perf/arch/x86/util/intel-bts.c | 2 +-
tools/perf/arch/x86/util/intel-pt.c | 6 ++--
tools/perf/builtin-stat.c | 9 +++---
tools/perf/builtin-trace.c | 4 +--
tools/perf/tests/Build | 1 +
tools/perf/tests/backward-ring-buffer.c | 3 +-
tools/perf/tests/builtin-test.c | 4 +++
tools/perf/tests/code-reading.c | 2 +-
tools/perf/tests/event-times.c | 2 +-
tools/perf/tests/evsel-roundtrip-name.c | 4 +--
tools/perf/tests/hists_cumulate.c | 2 +-
tools/perf/tests/hists_filter.c | 4 +--
tools/perf/tests/hists_link.c | 4 +--
tools/perf/tests/hists_output.c | 2 +-
tools/perf/tests/keep-tracking.c | 4 +--
tools/perf/tests/parse-events.c | 2 +-
tools/perf/tests/parse-metric.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/perf/tests/pmu-events.c | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
tools/perf/tests/switch-tracking.c | 8 ++---
tools/perf/tests/tests.h | 1 +
tools/perf/util/bpf-loader.c | 2 +-
tools/perf/util/metricgroup.c | 74 ++++++++++++++++++++++++++++++++++++----------
tools/perf/util/metricgroup.h | 10 +++++++
tools/perf/util/parse-events.c | 29 +++++++++++-------
tools/perf/util/parse-events.h | 5 ++--
tools/perf/util/parse-events.l | 8 +++--
tools/perf/util/parse-events.y | 41 ++++++++++++++++++++++++--
tools/perf/util/perf_api_probe.c | 2 +-
tools/perf/util/record.c | 2 +-
tools/perf/util/stat-shadow.c | 67 ++++++++++++++++++++++++++++++------------
tools/perf/util/stat.h | 3 ++
36 files changed, 527 insertions(+), 92 deletions(-)
create mode 100644 tools/perf/tests/parse-metric.c