summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Lowe-Power <jason@lowepower.com>2017-06-20 11:01:08 -0500
committerJason Lowe-Power <jason@lowepower.com>2017-06-21 13:57:21 +0000
commit9cdfcf93470ca11c12eeac50aea9536ef914790f (patch)
tree80f3a1013ef314282477bac4ae8a8b13359abee0 /src
parent85e1a9b8548ca2df406fd1ff56568a7ee1481aa0 (diff)
downloadgem5-9cdfcf93470ca11c12eeac50aea9536ef914790f.tar.xz
sim: Updated ClockedObject power state warning
To prevent this warning from printing for *every* simulation, this patch adds a check to only print the warning if we are not at the beginning of simulation. Change-Id: I7f6154f0ca26bef6280f909f799aa1c7936b624a Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/3840 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src')
-rw-r--r--src/sim/clocked_object.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/clocked_object.cc b/src/sim/clocked_object.cc
index f0b176509..ddf9e0f4d 100644
--- a/src/sim/clocked_object.cc
+++ b/src/sim/clocked_object.cc
@@ -90,7 +90,7 @@ ClockedObject::pwrState(Enums::PwrState p)
// same tick if other conditions are not met elsewhere.
// Any state change related stats would have been recorded on previous call
// to the pwrState() function.
- if (prvEvalTick == curTick()) {
+ if (prvEvalTick == curTick() && curTick() != 0) {
warn("ClockedObject: More than one power state change request "\
"encountered within the same simulation tick");
_currPwrState = p;