From: Andreas Sandberg Date: Mon, 5 Oct 2020 14:27:55 +0000 (+0100) Subject: stats: Output new-world stats before legacy stats X-Git-Tag: develop-gem5-snapshot~656 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85a3feb3cd4c1400353bd3215a574f5bf59d9189;p=gem5.git stats: Output new-world stats before legacy stats Now that global stats have been converted to new-style stats, it's desirable to output them before legacy stats. This ensures that global statistics (e.g., host_seconds) show up first in the stat file. Change-Id: Ib099d0152a6612ebbadd234c27f2f3448aef1260 Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35617 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/python/m5/stats/__init__.py b/src/python/m5/stats/__init__.py index 6c4a42cb8..1fc6c9c08 100644 --- a/src/python/m5/stats/__init__.py +++ b/src/python/m5/stats/__init__.py @@ -345,13 +345,13 @@ def _dump_to_visitor(visitor, roots=None): for p in reversed(root.path_list()): visitor.endGroup() else: + # New stats starting from root. + dump_group(Root.getInstance()) + # Legacy stats for stat in stats_list: stat.visit(visitor) - # New stats starting from root. - dump_group(Root.getInstance()) - lastDump = 0 # List[SimObject]. global_dump_roots = []