diff options
Diffstat (limited to 'tools/perf/pmu-events/jevents.py')
-rwxr-xr-x | tools/perf/pmu-events/jevents.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index 533071a014d7..ca99b9cfe4ad 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -922,7 +922,7 @@ def main() -> None: def ftw(path: str, parents: Sequence[str], action: Callable[[Sequence[str], os.DirEntry], None]) -> None: """Replicate the directory/file walking behavior of C's file tree walk.""" - for item in os.scandir(path): + for item in sorted(os.scandir(path), key=lambda e: e.name): if _args.model != 'all' and item.is_dir(): # Check if the model matches one in _args.model. if len(parents) == _args.model.split(',')[0].count('/'): |