summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2016-06-06 17:16:44 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2016-06-06 17:16:44 +0100
commit21b66f45422bc449d4a8b86ab452d6b6ae5838bf (patch)
tree9d764199ed94ecd210f25140c760acd9bf683c6f
parent12714040a2699d4eff001956649597345243a591 (diff)
downloadgem5-21b66f45422bc449d4a8b86ab452d6b6ae5838bf.tar.xz
sim: Only print the power state transition warning once
A lot of objects seem to request no-op power transitions which currently results in large amounts of warnings. These warnings are benign and risk hiding more serious warnings. Make the warning a warn_once to prevent console flooding. Change-Id: I86c74b4224b167f14469250ef86ab69fde7a227e Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
-rw-r--r--src/sim/clocked_object.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/clocked_object.cc b/src/sim/clocked_object.cc
index 44b25cd5d..f0b176509 100644
--- a/src/sim/clocked_object.cc
+++ b/src/sim/clocked_object.cc
@@ -78,8 +78,8 @@ ClockedObject::pwrState(Enums::PwrState p)
{
// Function should ideally be called only when there is a state change
if (_currPwrState == p) {
- warn("ClockedObject: Already in the requested power state, request "\
- "ignored");
+ warn_once("ClockedObject: Already in the requested power state, " \
+ "request ignored");
return;
}