Skip to content

perf tests: Add metrics tests

Jiri Olsa lkml 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest13 patches 0 repliesNew
  2. v213 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- few typo fixes [Ian]
- move struct parse_events_error one level up in check_parse_id [Ian]
- added Ian's acks

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13perf tools: Add fake pmu supporttools/perf/util/parse-events.c tools/perf/util/parse-events.h tools/perf/util/parse-events.l +1 more+58 -80 replies
2/13perf tools: Add fake_pmu bool to parse_events interfacetools/perf/arch/arm/util/cs-etm.c tools/perf/arch/arm64/util/arm-spe.c tools/perf/arch/powerpc/util/kvm-stat.c +24 more+48 -460 replies
3/13perf tests: Factor check_parse_id functiontools/perf/tests/pmu-events.c+14 -60 replies
4/13perf tests: Add another metric parsing testtools/perf/tests/pmu-events.c+114 -30 replies
5/13perf tools: Factor out parse_groups functiontools/perf/util/metricgroup.c+16 -60 replies
6/13perf tools: Add fake_pmu to parse_events functiontools/perf/util/metricgroup.c+3 -20 replies
7/13perf tools: Add map to parse_events functiontools/perf/util/metricgroup.c+13 -100 replies
8/13perf tools: Add metricgroup__parse_groups_test functiontools/perf/util/metricgroup.c tools/perf/util/metricgroup.h+20 -00 replies
9/13perf tools: Factor out prepare_metric functiontools/perf/util/stat-shadow.c+34 -190 replies
10/13perf tools: Release metric_events rblisttools/perf/builtin-stat.c tools/perf/util/metricgroup.c tools/perf/util/metricgroup.h+21 -00 replies
11/13perf tools: Add test_generic_metric functiontools/perf/util/stat-shadow.c tools/perf/util/stat.h+17 -00 replies
12/13perf tests: Add parse metric test for ipc metrictools/perf/tests/Build tools/perf/tests/builtin-test.c tools/perf/tests/parse-metric.c +1 more+151 -00 replies
13/13perf tests: Add parse metric test for frontend metrictools/perf/tests/parse-metric.c+25 -00 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchIan Rogers
1/13A-b
2/13A-b
3/13A-b
4/13A-b
5/13A-b
6/13A-b
7/13A-b
8/13A-b
9/13A-b
10/13A-b
11/13A-b
12/13A-b
13/13A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 00/13] perf tests: Add metrics tests

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.

v3 changes:
- few typo fixes [Ian]
- move struct parse_events_error one level up in check_parse_id [Ian]
- added Ian's acks

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 ;-)

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                | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 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, 526 insertions(+), 92 deletions(-)
 create mode 100644 tools/perf/tests/parse-metric.c