Alex Richardson has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/54983 )
Change subject: misc: Generate StateMachine debug includes in deterministic
order
......................................................................
misc: Generate StateMachine debug includes in deterministic order
Since 3454a4a36e927f483b36fa66baabe2c85ecf3ddc the order of the debug/
includes is non-deterministic which can result in unnecessary rebuilds.
Change-Id: I583d2caf70632e08fa59ac85073786270991edbc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54983
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/mem/slicc/symbols/StateMachine.py
1 file changed, 24 insertions(+), 3 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/mem/slicc/symbols/StateMachine.py
b/src/mem/slicc/symbols/StateMachine.py
index 5d315e9..a9f7373 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -105,6 +105,8 @@
self.objects = []
self.TBEType = None
self.EntryType = None
+ # Python's sets are not sorted so we have to be careful when using
+ # this to generate deterministic output.
self.debug_flags = set()
self.debug_flags.add('RubyGenerated')
self.debug_flags.add('RubySlicc')
@@ -516,8 +518,9 @@
code(boolvec_include)
code(base_include)
-
- for f in self.debug_flags:
+ # We have to sort self.debug_flags in order to produce
deterministic
+ # output and avoid unnecessary rebuilds of the generated files.
+ for f in sorted(self.debug_flags):
code('#include "debug/${{f}}.hh"')
code('''
#include "mem/ruby/network/Network.hh"
@@ -1246,7 +1249,9 @@
#include "base/logging.hh"
''')
- for f in self.debug_flags:
+ # We have to sort self.debug_flags in order to produce
deterministic
+ # output and avoid unnecessary rebuilds of the generated files.
+ for f in sorted(self.debug_flags):
code('#include "debug/${{f}}.hh"')
code('''
#include "mem/ruby/protocol/${ident}_Controller.hh"
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/54983
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I583d2caf70632e08fa59ac85073786270991edbc
Gerrit-Change-Number: 54983
Gerrit-PatchSet: 3
Gerrit-Owner: Alex Richardson <alexrichard...@google.com>
Gerrit-Reviewer: Alex Richardson <alexrichard...@google.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <ucdavis.gem5.gcl...@gmail.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s