summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/python/m5/stats/__init__.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/python/m5/stats/__init__.py b/src/python/m5/stats/__init__.py
index ba91f22c7..acb62f13e 100644
--- a/src/python/m5/stats/__init__.py
+++ b/src/python/m5/stats/__init__.py
@@ -169,12 +169,7 @@ def enable():
if not (stat.flags & flags.display):
stat.name = "__Stat%06d" % stat.id
- def less(stat1, stat2):
- v1 = stat1.name.split('.')
- v2 = stat2.name.split('.')
- return v1 < v2
-
- stats_list.sort(less)
+ stats_list.sort(key=lambda s: s.name.split('.'))
for stat in stats_list:
stats_dict[stat.name] = stat
stat.enable()