From: Andreas Sandberg Date: Mon, 6 Jun 2016 16:16:44 +0000 (+0100) Subject: sim: Only print the power state transition warning once X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21b66f45422bc449d4a8b86ab452d6b6ae5838bf;p=gem5.git 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 --- 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; }