[PATCH v1 0/3] perf jevents: Deterministic build fix and mypy cleanliness

From: Ian Rogers

Date: Mon Jul 06 2026 - 23:40:57 EST


Nazar Kazakov reported non-deterministic builds due to the metrics
being reordered in the jevents.py output. Fix by sorting metrics on
more than just their name.

Checking the code with mypy showed a large range of type warnings. Fix
by largely adding asserts that values aren't None and by adding type
annotations.

Ian Rogers (3):
perf jevents: Add more components to the metric sorting order
perf jevents: Add python type annotations
perf jevents metric: Add python type annotations

tools/perf/pmu-events/jevents.py | 82 +++++++++++++++++++-------------
tools/perf/pmu-events/metric.py | 23 +++++----
2 files changed, 62 insertions(+), 43 deletions(-)

--
2.55.0.795.g602f6c329a-goog