Re: [PATCH] perf jevents: make events order more deterministic

From: Nazar Kazakov

Date: Mon Jul 06 2026 - 15:10:28 EST


On 2026-07-06 19:48, Ian Rogers wrote:

I see the problem from your example. I wonder a more complete fix
would be something like:
```
def __lt__(self, other):
"""Sort order."""
if self.name != other.name:
return self.name < other.name
if not self.expr.Equals(other.expr):
return self.expr.ToPerfJson() < other.expr.ToPerfJson()
return self.description < other.description
```
wdyt?

Yep, your code looks better. Also Sashiko AI tool found an embarrasing
bug in mine https://sashiko.dev/#/patchset/20260706175624.692736-1-nazar.kazakov@xxxxxxxxxxxxxxx?part=1

So let's go with yours :)

Thanks,
Nazar Kazakov