summaryrefslogtreecommitdiff
path: root/src/cpu/testers
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2010-12-22 23:15:24 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2010-12-22 23:15:24 -0600
commit58fa2857e123a44b1633628b898847773153c047 (patch)
treeabf6318d961c8bcb31d7a0f5c4aa9bbb4a0db0ed /src/cpu/testers
parent2c0e80f96bee8c2ad48cd3fb7a18af149bfe76bc (diff)
downloadgem5-58fa2857e123a44b1633628b898847773153c047.tar.xz
This patch removes the WARN_* and ERROR_* from src/mem/ruby/common/Debug.hh file. These statements have been replaced with warn(), panic() and fatal() defined in src/base/misc.hh
Diffstat (limited to 'src/cpu/testers')
-rw-r--r--src/cpu/testers/rubytest/Check.cc25
-rw-r--r--src/cpu/testers/rubytest/CheckTable.cc2
-rw-r--r--src/cpu/testers/rubytest/RubyTester.cc10
3 files changed, 16 insertions, 21 deletions
diff --git a/src/cpu/testers/rubytest/Check.cc b/src/cpu/testers/rubytest/Check.cc
index 9ace655a8..0d384b08a 100644
--- a/src/cpu/testers/rubytest/Check.cc
+++ b/src/cpu/testers/rubytest/Check.cc
@@ -270,15 +270,13 @@ Check::performCallback(NodeID proc, SubBlock* data)
// Perform load/check
for (int byte_number=0; byte_number<CHECK_SIZE; byte_number++) {
if (uint8(m_value + byte_number) != data->getByte(byte_number)) {
- WARN_EXPR(proc);
- WARN_EXPR(address);
- WARN_EXPR(data);
- WARN_EXPR(byte_number);
- WARN_EXPR((int)m_value + byte_number);
- WARN_EXPR((int)data->getByte(byte_number));
- WARN_EXPR(*this);
- WARN_EXPR(g_eventQueue_ptr->getTime());
- ERROR_MSG("Action/check failure");
+ panic("Action/check failure: proc: %d address: %s data: %s "
+ "byte_number: %d m_value+byte_number: %d byte: %d %s"
+ "Time: %d\n",
+ proc, address, data, byte_number,
+ (int)m_value + byte_number,
+ (int)data->getByte(byte_number), *this,
+ g_eventQueue_ptr->getTime());
}
}
DPRINTF(RubyTest, "Action/check success\n");
@@ -291,12 +289,9 @@ Check::performCallback(NodeID proc, SubBlock* data)
pickValue();
} else {
- WARN_EXPR(*this);
- WARN_EXPR(proc);
- WARN_EXPR(data);
- WARN_EXPR(m_status);
- WARN_EXPR(g_eventQueue_ptr->getTime());
- ERROR_MSG("Unexpected TesterStatus");
+ panic("Unexpected TesterStatus: %s proc: %d data: %s m_status: %s "
+ "time: %d\n",
+ *this, proc, data, m_status, g_eventQueue_ptr->getTime());
}
DPRINTF(RubyTest, "proc: %d, Address: 0x%x\n", proc,
diff --git a/src/cpu/testers/rubytest/CheckTable.cc b/src/cpu/testers/rubytest/CheckTable.cc
index 4a0c1eadd..af7467148 100644
--- a/src/cpu/testers/rubytest/CheckTable.cc
+++ b/src/cpu/testers/rubytest/CheckTable.cc
@@ -81,7 +81,7 @@ CheckTable::addCheck(const Address& address)
{
if (floorLog2(CHECK_SIZE) != 0) {
if (address.bitSelect(0, CHECK_SIZE_BITS - 1) != 0) {
- ERROR_MSG("Check not aligned");
+ panic("Check not aligned");
}
}
diff --git a/src/cpu/testers/rubytest/RubyTester.cc b/src/cpu/testers/rubytest/RubyTester.cc
index 516d6ae40..8c5aafd89 100644
--- a/src/cpu/testers/rubytest/RubyTester.cc
+++ b/src/cpu/testers/rubytest/RubyTester.cc
@@ -27,6 +27,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "base/misc.hh"
#include "cpu/testers/rubytest/Check.hh"
#include "cpu/testers/rubytest/RubyTester.hh"
#include "mem/ruby/common/Global.hh"
@@ -173,11 +174,10 @@ RubyTester::checkForDeadlock()
for (int processor = 0; processor < size; processor++) {
if ((current_time - m_last_progress_vector[processor]) >
m_deadlock_threshold) {
- WARN_EXPR(current_time);
- WARN_EXPR(m_last_progress_vector[processor]);
- WARN_EXPR(current_time - m_last_progress_vector[processor]);
- WARN_EXPR(processor);
- ERROR_MSG("Deadlock detected.");
+ panic("Deadlock detected: current_time: %d last_progress_time: %d "
+ "difference: %d processor: %d\n",
+ current_time, m_last_progress_vector[processor],
+ current_time - m_last_progress_vector[processor], processor);
}
}
}