summaryrefslogtreecommitdiff
path: root/src/systemc/utils/report.cc
AgeCommit message (Collapse)Author
2018-11-09systemc: Stop using python init to set up predefined message ids.Gabe Black
We can now be sure register_id will work even mid static initializers, so we don't have to use python initialization as a hook to install these predefined message ids. Change-Id: I2e4d0c678ddda0a9ce5b114bdf1710f36e955f23 Reviewed-on: https://gem5-review.googlesource.com/c/13976 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2018-11-09systemc: Wrap some report maps in functions.Gabe Black
By declaring the map as a static variable in that function and then returning it, we can guarantee that it's initialized relative to other static initializers so that we don't try to use a data structure that isn't constructed yet. This will let us get rid of the dependence on python for setting up that mapping. Change-Id: I031ce2039de8f5f79fbb9d76cf1363f15207b64b Reviewed-on: https://gem5-review.googlesource.com/c/13975 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2018-10-16systemc: Don't depend on the order of static initializers.Gabe Black
STL containers may need to be constructed before they're used. Don't count on being able to insert into them during a static initializer. Change-Id: Icb05d5084a470e1ebd976ae6e1954b1a78aabd6a Reviewed-on: https://gem5-review.googlesource.com/c/13329 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-10-16systemc: Add a mechanism for pre-registering message type ids.Gabe Black
These ids are the ones the Accellera implementation/tests use. Some of the tests expect them to be available and usable. Change-Id: I4e4dc3470c28d4113330a44ccd06ffe7724e75b1 Reviewed-on: https://gem5-review.googlesource.com/c/13322 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-10-16systemc: Handle integer based IDs like Accellera does.Gabe Black
This is actually not consistent with how it was handled in 2.0.1 which is supposedly what this is supposed to be backwards compatible with, in that in the earlier version on info and warning messages were suppressed. This is exposed by one of the tests, utils/sc_report/test01, which suppresses an integer ID and then reports an error with it. The "golden" output shows the message supressed, but the actual implementation makes no such distinction. This implementation duplicates Accelleras for now, but a future change will make it consistent with the old implementation so the test will pass. Change-Id: I8f959321151e2bb60b94000594f30531b80e2684 Reviewed-on: https://gem5-review.googlesource.com/c/13319 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-10-16systemc: Refactor reporting to prep for int based messages.Gabe Black
There's a deprecated reporting mechanism based on integer message ids, and the reporting mechanism needs to be refactored a bit to make it easier to support. Some bookkeeping data structures were moved out to somewhere they can be accessed by other code, obviating the non-standard get_handler function. Change-Id: Id427cd79be9ef0f3275fbac39ff047ab672fb3e0 Reviewed-on: https://gem5-review.googlesource.com/c/13318 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>