perf test pmu-events case
Status from this message: Applied the series to perf/core, good job! What about the fix for the
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
Changes in v2 from the cover letter
- Verify event table in generated pmu-events.c, in addition to verifying aliases
- Don't create separate table for test events, but include as a "testcpu"
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | perf jevents: Add some test eventstools/ tools/ tools/ | +59 | 0 replies | |
| 2/7 | perf jevents: Support test events foldertools/ | +30 | 5 replies | |
| 3/7 | perf pmu: Refactor pmu_add_cpu_aliases()tools/ tools/ | +16 | 0 replies | |
| 4/7 | perf test: Add pmu-events testtools/ tools/ tools/ +1 more | +233 | 0 replies | |
| 5/7 | perf pmu: Add is_pmu_core()tools/ tools/ | +6 | 0 replies | |
| 6/7 | perf pmu: Make pmu_uncore_alias_match() publictools/ tools/ | +2 | 0 replies | |
| 7/7 | perf test: Test pmu-events aliasestools/ | +147 | 6 replies |
Reviews trailers per patch
None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Jiri Olsa |
|---|---|
| Series | A-b |
| 1/7 | |
| 2/7 | |
| 3/7 | |
| 4/7 | |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/7] perf test pmu-events case
This series introduces a basic pmu-events test case.
The test works in two steps:
- Verifies events in generated pmu-events.c are as expected for some test events
- Verifies correctly created aliases for those test events for the HW PMUs in the host system
The test events are invented, and are (mostly) arch agnostic (even though I copied these events from pre-existing x86 and arm64 JSONs).
In the test, core and uncore events are treated slightly differently for testing aliases. For core test events, all events are matched. However, for uncore test events, these have "Unit" property, so can only be matched when the corresponding HW PMU exists in the host sytem.
A test run looks like this on my x86 dev box:
$ tools/perf/perf test -vv 10
10: PMU events :
--- start ---
test child forked, pid 26610
testing event table bp_l1_btb_correct: pass
testing event table bp_l2_btb_correct: pass
testing event table segment_reg_loads.any: pass
testing event table dispatch_blocked.any: pass
testing event table eist_trans: pass
testing event table uncore_hisi_ddrc.flux_wcmd: pass
testing event table unc_cbo_xsnp_response.miss_eviction: pass
Using CPUID GenuineIntel-6-3D-4intel_pt default config: tsc,pt,branch
skipping testing PMU breakpoint
testing aliases PMU uncore_cbox_1: matched event unc_cbo_xsnp_response.miss_eviction testing PMU uncore_cbox_1 aliases: pass
testing aliases PMU cpu: matched event bp_l1_btb_correct
testing aliases PMU cpu: matched event bp_l2_btb_correct
testing aliases PMU cpu: matched event segment_reg_loads.any
testing aliases PMU cpu: matched event dispatch_blocked.any
testing aliases PMU cpu: matched event eist_trans
testing PMU cpu aliases: pass
skipping testing PMU software
skipping testing PMU intel_bts
testing aliases PMU uncore_cbox_0: matched event unc_cbo_xsnp_response.miss_eviction testing PMU uncore_cbox_0 aliases: pass
skipping testing PMU tracepoint
test child finished with 0
---- end ----
PMU events: Ok
Changes since v1:
- Verify event table in generated pmu-events.c, in addition to verifying aliases
- Don't create separate table for test events, but include as a "testcpu"
John Garry (7):
perf jevents: Add some test events
perf jevents: Support test events folder
perf pmu: Refactor pmu_add_cpu_aliases()
perf test: Add pmu-events test
perf pmu: Add is_pmu_core()
perf pmu: Make pmu_uncore_alias_match() public
perf test: Test pmu-events aliases
.../perf/pmu-events/arch/test/test_cpu/branch.json | 12 + .../perf/pmu-events/arch/test/test_cpu/other.json | 26 ++ .../perf/pmu-events/arch/test/test_cpu/uncore.json | 21 ++ tools/perf/pmu-events/jevents.c | 30 ++ tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 + tools/perf/tests/pmu-events.c | 373 +++++++++++++++++++++ tools/perf/tests/tests.h | 1 + tools/perf/util/pmu.c | 28 +- tools/perf/util/pmu.h | 5 + 10 files changed, 492 insertions(+), 9 deletions(-) create mode 100644 tools/perf/pmu-events/arch/test/test_cpu/branch.json create mode 100644 tools/perf/pmu-events/arch/test/test_cpu/other.json create mode 100644 tools/perf/pmu-events/arch/test/test_cpu/uncore.json create mode 100644 tools/perf/tests/pmu-events.c
Signature · 1 line
2.12.3