Re: [PATCH v1 0/3] perf jevents: Deterministic build fix and mypy cleanliness
From: Ian Rogers
Date: Tue Jul 14 2026 - 12:40:18 EST
On Mon, Jul 6, 2026 at 8:40 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> 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.
Ping. There's Sashiko feedback on patch 1:
https://sashiko.dev/#/patchset/20260707034019.241762-1-irogers%40google.com
but it basically says that having a metric name with no metric
expression will cause a crash, which is expected behavior.
Nazar, it would be great if you could provide a Tested-by tag :-)
Thanks,
Ian
> 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
>