perf tests: Add uncore and x86 topdown event sorting tests
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest2 patches 2 repliesIn review
- v72 patches 0 repliesSuperseded
- v62 patches 0 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 2 patches | 0 replies | Superseded | |
| v4 | 2 patches | 0 replies | Superseded | |
| v3 | 2 patches | 2 replies | Superseded | |
| v2 | 2 patches | 0 replies | Superseded | |
| v1 | 2 patches | 4 replies | Superseded |
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | perf tests: Add test for uncore event sortingtools/ tools/ tools/ +1 more | +179 | 0 replies | |
| 2/2 | perf arch x86 tests: Add test for topdown event sortingtools/ | +165 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Zide Chen | Namhyung Kim |
|---|---|---|
| Series | T-b | |
| 1/2 | T-b | |
| 2/2 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v8 0/2] perf tests: Add uncore and x86 topdown event sorting tests
A patch thread changing event sorting highlighted a lack of testing for the more complicated uncore and x86 perf metric event sorting:
https://lore.kernel.org/linux-perf-users/CAP-5=fWRgDo7UnJAD4C--d=mVPRhOEWZVyU7nVM1YEp3jncAgg@mail.gmail.com/
v8: Simplify event_cb in the uncore event sorting test by removing the
unreachable dead-code else block (reported by Sashiko).
v7: - Prevent double-free of m.event1 and dangling pointer access upon
PMU scanning loop termination or early continue in the uncore event sorting test by utilizing standard perf zfree() helpers (reported by Sashiko).
- Document Intel Hybrid CPU architectural invariants in the x86 topdown test to clarify why instructions correctly leads a group of 2 on E-cores (cpu_atom) where slots is unsupported and filtered out (reported by Sashiko).
v6: - Ensure robust error initialization and resource cleanup in both
uncore and topdown tests by initializing evlist to NULL and parse_events_error at function entry, preventing uninitialized stack access or resource leaks on early return paths (reported by Sashiko).
- Prevent double evaluation and duplicate debug logging upon test assertion failure in the x86 topdown test by caching test_sort() return values into local variables (reported by Sashiko).
v5: - Strengthen uncore event sorting test assertions to require at
least 4 total events (>= 2 groups of 2 events) instead of > 0 events, guaranteeing that multi-PMU wildcard expansion is genuinely exercised across multiple sibling PMUs (reported by Sashiko).
- Fix memory leaks on assertion failure across both uncore and topdown test suites by replacing standard TEST_ASSERT macros with local CHECK macros that correctly branch to out_err cleanup handlers (reported by Sashiko).
- Fix test_sort() in the x86 topdown test to correctly return TEST_FAIL (-1) instead of parse_events() internal error codes (e.g., -EINVAL) when event parsing fails (reported by Namhyung).
v4: Fix malformed event group string formatting in the uncore event
sorting test when running on AMD systems (where sysfs event aliases lack JSON descriptions - reported by Namhyung). Added a helper to strip redundant PMU prefixes and trailing slashes to ensure parse_events() receives valid syntax across all architectures.
v3: Address sashiko nits on using evsel__name and ensuring slots is injected.
https://lore.kernel.org/linux-perf-users/[email protected]/
v2: Address indentation and other nits from Namhyung. Add Zide Chen's
tested-by tags.
https://lore.kernel.org/lkml/[email protected]/
v1: https://lore.kernel.org/lkml/[email protected]/
Ian Rogers (2):
perf tests: Add test for uncore event sorting perf arch x86 tests: Add test for topdown event sorting
tools/perf/arch/x86/tests/topdown.c | 166 +++++++++++++++++++++- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/uncore-event-sorting.c | 176 ++++++++++++++++++++++++ 5 files changed, 344 insertions(+), 1 deletion(-) create mode 100644 tools/perf/tests/uncore-event-sorting.c
Signature · 1 line
2.54.0.563.g4f69b47b94-goog