diff -r 998b217dcae7 src/mem/protocol/RubySlicc_Util.sm --- a/src/mem/protocol/RubySlicc_Util.sm Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/protocol/RubySlicc_Util.sm Sun Dec 19 14:01:59 2010 -0600 @@ -46,7 +46,6 @@ Time getTimePlusInt(Time addend1, int addend2); Time getTimeMinusTime(Time t1, Time t2); Time getPreviousDelayedCycles(Time t1, Time t2); -void WARN_ERROR_TIME(Time time); void procProfileCoherenceRequest(NodeID node, bool needCLB); void dirProfileCoherenceRequest(NodeID node, bool needCLB); bool isPerfectProtocol(); diff -r 998b217dcae7 src/mem/ruby/buffers/MessageBuffer.cc --- a/src/mem/ruby/buffers/MessageBuffer.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/buffers/MessageBuffer.cc Sun Dec 19 14:01:59 2010 -0600 @@ -27,6 +27,7 @@ */ #include "base/cprintf.hh" +#include "base/misc.hh" #include "base/stl_helpers.hh" #include "mem/ruby/buffers/MessageBuffer.hh" #include "mem/ruby/system/System.hh" @@ -161,9 +162,8 @@ // the plus one is a kluge because of a SLICC issue if (!m_ordering_set) { - // WARN_EXPR(*this); - WARN_EXPR(m_name); - ERROR_MSG("Ordering property of this queue has not been set"); + warn("%s %s\n", *this, m_name); + fatal("Ordering property of this queue has not been set"); } // Calculate the arrival time of the message, that is, the first @@ -191,13 +191,9 @@ assert(arrival_time > current_time); if (m_strict_fifo) { if (arrival_time < m_last_arrival_time) { - WARN_EXPR(*this); - WARN_EXPR(m_name); - WARN_EXPR(current_time); - WARN_EXPR(delta); - WARN_EXPR(arrival_time); - WARN_EXPR(m_last_arrival_time); - ERROR_MSG("FIFO ordering violated"); + warn("%s %s %d %d %d %d\n", *this, m_name, current_time, + delta, arrival_time, m_last_arrival_time); + panic("FIFO ordering violated"); } } m_last_arrival_time = arrival_time; @@ -229,9 +225,8 @@ if (m_consumer_ptr != NULL) { g_eventQueue_ptr->scheduleEventAbsolute(m_consumer_ptr, arrival_time); } else { - WARN_EXPR(*this); - WARN_EXPR(m_name); - ERROR_MSG("No consumer"); + warn("%s %s\n", *this, m_name); + panic("No consumer"); } } diff -r 998b217dcae7 src/cpu/testers/rubytest/RubyTester.cc --- a/src/cpu/testers/rubytest/RubyTester.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/cpu/testers/rubytest/RubyTester.cc Sun Dec 19 14:01:59 2010 -0600 @@ -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 @@ 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."); + warn("%d %d %d %d\n", current_time, + m_last_progress_vector[processor], + current_time - m_last_progress_vector[processor], processor); + panic("Deadlock detected."); } } } diff -r 998b217dcae7 src/cpu/testers/rubytest/CheckTable.cc --- a/src/cpu/testers/rubytest/CheckTable.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/cpu/testers/rubytest/CheckTable.cc Sun Dec 19 14:01:59 2010 -0600 @@ -81,7 +81,7 @@ { if (floorLog2(CHECK_SIZE) != 0) { if (address.bitSelect(0, CHECK_SIZE_BITS - 1) != 0) { - ERROR_MSG("Check not aligned"); + panic("Check not aligned"); } } diff -r 998b217dcae7 src/cpu/testers/rubytest/Check.cc --- a/src/cpu/testers/rubytest/Check.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/cpu/testers/rubytest/Check.cc Sun Dec 19 14:01:59 2010 -0600 @@ -270,15 +270,11 @@ // Perform load/check for (int byte_number=0; byte_numbergetByte(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"); + warn("%d %s %s %d %d %d %s %d\n", proc, address, data, + byte_number, (int)m_value + byte_number, + (int)data->getByte(byte_number), *this, + g_eventQueue_ptr->getTime()); + panic("Action/check failure"); } } DPRINTF(RubyTest, "Action/check success\n"); @@ -291,12 +287,9 @@ 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"); + warn("%s %d %s %s %d\n", *this, proc, data, m_status, + g_eventQueue_ptr->getTime()); + panic("Unexpected TesterStatus"); } DPRINTF(RubyTest, "proc: %d, Address: 0x%x\n", proc, diff -r 998b217dcae7 src/mem/ruby/common/Debug.hh --- a/src/mem/ruby/common/Debug.hh Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/common/Debug.hh Sun Dec 19 14:01:59 2010 -0600 @@ -119,9 +119,6 @@ return out; } -const bool ERROR_MESSAGE_FLAG = true; -const bool WARNING_MESSAGE_FLAG = true; - #undef assert #define assert(EXPR) ASSERT(EXPR) #undef ASSERT @@ -161,67 +158,5 @@ #endif // NDEBUG -#define ERROR_MSG(MESSAGE) do { \ - using namespace std; \ - if (ERROR_MESSAGE_FLAG) { \ - cerr << "Fatal Error: in fn " \ - << __PRETTY_FUNCTION__ << " in " \ - << __FILE__ << ":" \ - << __LINE__ << ": " \ - << (MESSAGE) << endl << flush; \ - (* debug_cout_ptr) << "Fatal Error: in fn " \ - << __PRETTY_FUNCTION__ << " in " \ - << __FILE__ << ":" \ - << __LINE__ << ": " \ - << (MESSAGE) << endl << flush; \ - abort(); \ - } \ -} while(0) - -#define WARN_MSG(MESSAGE) do { \ - using namespace std; \ - if (WARNING_MESSAGE_FLAG) { \ - cerr << "Warning: in fn " \ - << __PRETTY_FUNCTION__ << " in " \ - << __FILE__ << ":" \ - << __LINE__ << ": " \ - << (MESSAGE) << endl << flush; \ - (* debug_cout_ptr) << "Warning: in fn " \ - << __PRETTY_FUNCTION__ << " in " \ - << __FILE__ << ":" \ - << __LINE__ << ": " \ - << (MESSAGE) << endl << flush; \ - } \ -} while (0) - -#define WARN_EXPR(EXPR) do { \ - using namespace std; \ - if (WARNING_MESSAGE_FLAG) { \ - cerr << "Warning: in fn " \ - << __PRETTY_FUNCTION__ << " in " \ - << __FILE__ << ":" \ - << __LINE__ << ": " \ - << #EXPR << " is " \ - << (EXPR) << endl << flush; \ - (* debug_cout_ptr) << "Warning: in fn " \ - << __PRETTY_FUNCTION__ << " in " \ - << __FILE__ << ":" \ - << __LINE__ << ": " \ - << #EXPR << " is " \ - << (EXPR) << endl << flush; \ - } \ -} while (0) - -#define ERROR_OUT( rest... ) do { \ - using namespace std; \ - if (ERROR_MESSAGE_FLAG) { \ - cout << "error: in fn " \ - << __PRETTY_FUNCTION__ << " in " \ - << __FILE__ << ":" \ - << __LINE__ << ": "; \ - g_debug_ptr->debugMsg(rest); \ - } \ -} while (0) - #endif // __MEM_RUBY_COMMON_DEBUG_HH__ diff -r 998b217dcae7 src/mem/ruby/common/NetDest.cc --- a/src/mem/ruby/common/NetDest.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/common/NetDest.cc Sun Dec 19 14:01:59 2010 -0600 @@ -151,7 +151,7 @@ } } } - ERROR_MSG("No smallest element of an empty set."); + fatal("No smallest element of an empty set."); } MachineID @@ -165,7 +165,7 @@ } } - ERROR_MSG("No smallest element of given MachineType."); + fatal("No smallest element of given MachineType."); } // Returns true iff all bits are set diff -r 998b217dcae7 src/mem/ruby/common/Set.cc --- a/src/mem/ruby/common/Set.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/common/Set.cc Sun Dec 19 14:01:59 2010 -0600 @@ -29,6 +29,7 @@ // modified (rewritten) 05/20/05 by Dan Gibson to accomimdate FASTER // >32 bit set sizes +#include "base/misc.hh" #include "mem/ruby/common/Set.hh" #include "mem/ruby/system/System.hh" @@ -199,11 +200,11 @@ x = x >> 1; } - ERROR_MSG("No smallest element of an empty set."); + fatal("No smallest element of an empty set."); } } - ERROR_MSG("No smallest element of an empty set."); + fatal("No smallest element of an empty set."); return 0; } diff -r 998b217dcae7 src/mem/ruby/network/Network.cc --- a/src/mem/ruby/network/Network.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/network/Network.cc Sun Dec 19 14:01:59 2010 -0600 @@ -26,6 +26,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "base/misc.hh" #include "mem/protocol/MachineType.hh" #include "mem/ruby/network/Network.hh" #include "mem/ruby/network/simple/Topology.hh" @@ -64,7 +65,7 @@ { switch(size_type) { case MessageSizeType_Undefined: - ERROR_MSG("Can't convert Undefined MessageSizeType to integer"); + panic("Can't convert Undefined MessageSizeType to integer"); break; case MessageSizeType_Control: case MessageSizeType_Request_Control: @@ -85,7 +86,7 @@ case MessageSizeType_Writeback_Data: return m_data_msg_size; default: - ERROR_MSG("Invalid range for type MessageSizeType"); + panic("Invalid range for type MessageSizeType"); break; } return 0; diff -r 998b217dcae7 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc --- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc Sun Dec 19 14:01:59 2010 -0600 @@ -156,7 +156,7 @@ m_router_ptr_vector[dest]->addInPort(net_link, credit_link); m_ni_ptr_vector[src]->addOutPort(net_link, credit_link); } else { - ERROR_MSG("Fatal Error:: Reconfiguration not allowed here"); + fatal("Fatal Error:: Reconfiguration not allowed here"); // do nothing } } @@ -188,7 +188,7 @@ link_weight, credit_link); m_ni_ptr_vector[dest]->addInPort(net_link, credit_link); } else { - ERROR_MSG("Fatal Error:: Reconfiguration not allowed here"); + fatal("Fatal Error:: Reconfiguration not allowed here"); // do nothing } } @@ -214,7 +214,7 @@ m_router_ptr_vector[src]->addOutPort(net_link, routing_table_entry, link_weight, credit_link); } else { - ERROR_MSG("Fatal Error:: Reconfiguration not allowed here"); + fatal("Fatal Error:: Reconfiguration not allowed here"); // do nothing } } diff -r 998b217dcae7 src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc --- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc Sun Dec 19 14:01:59 2010 -0600 @@ -333,7 +333,7 @@ return i; } } - ERROR_MSG("Could not determine vc"); + fatal("Could not determine vc"); return -1; } diff -r 998b217dcae7 src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc --- a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc Sun Dec 19 14:01:59 2010 -0600 @@ -81,7 +81,7 @@ } if (output_link == -1) { - ERROR_MSG("Fatal Error:: No Route exists from this Router."); + fatal("Fatal Error:: No Route exists from this Router."); exit(0); } diff -r 998b217dcae7 src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc --- a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc Sun Dec 19 14:01:59 2010 -0600 @@ -211,7 +211,7 @@ return i; } } - ERROR_MSG("Could not determine vc"); + fatal("Could not determine vc"); return -1; } diff -r 998b217dcae7 src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc --- a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc Sun Dec 19 14:01:59 2010 -0600 @@ -241,7 +241,7 @@ return i; } } - ERROR_MSG("Could not determine vc"); + fatal("Could not determine vc"); return -1; } diff -r 998b217dcae7 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc Sun Dec 19 14:01:59 2010 -0600 @@ -138,7 +138,7 @@ m_router_ptr_vector[dest]->addInPort(net_link); m_ni_ptr_vector[src]->addOutPort(net_link); } else { - ERROR_MSG("Fatal Error:: Reconfiguration not allowed here"); + fatal("Fatal Error:: Reconfiguration not allowed here"); // do nothing } } @@ -160,7 +160,7 @@ link_weight); m_ni_ptr_vector[dest]->addInPort(net_link); } else { - ERROR_MSG("Fatal Error:: Reconfiguration not allowed here"); + fatal("Fatal Error:: Reconfiguration not allowed here"); //do nothing } } @@ -178,7 +178,7 @@ m_router_ptr_vector[src]->addOutPort(net_link, routing_table_entry, link_weight); } else { - ERROR_MSG("Fatal Error:: Reconfiguration not allowed here"); + fatal("Fatal Error:: Reconfiguration not allowed here"); // do nothing } diff -r 998b217dcae7 src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh --- a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh Sun Dec 19 14:01:59 2010 -0600 @@ -151,7 +151,7 @@ if (machType == MachineType_Directory) return GenericMachineType_Directory; - ERROR_MSG("cannot convert to a GenericMachineType"); + panic("cannot convert to a GenericMachineType"); return GenericMachineType_NULL; } diff -r 998b217dcae7 src/mem/ruby/slicc_interface/RubySlicc_Util.hh --- a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh Sun Dec 19 14:01:59 2010 -0600 @@ -148,12 +148,6 @@ } } -inline void -WARN_ERROR_TIME(Time time) -{ - WARN_EXPR(time); -} - // Return type for time_to_int is "Time" and not "int" so we get a // 64-bit integer inline Time diff -r 998b217dcae7 src/mem/ruby/storebuffer/storebuffer.cc --- a/src/mem/ruby/storebuffer/storebuffer.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/storebuffer/storebuffer.cc Sun Dec 19 14:01:59 2010 -0600 @@ -42,8 +42,7 @@ hit(int64_t id) { if (request_map.find(id) == request_map.end()) { - ERROR_OUT("Request ID not found in the map"); - DPRINTF(RubyStorebuffer, "id: %lld\n", id); + warn("Request ID %d not found in the map\n", id); ASSERT(0); } else { request_map[id]->complete(id); @@ -94,8 +93,7 @@ // make request to libruby uint64_t id = libruby_issue_request(m_port, request); if (request_map.find(id) != request_map.end()) { - ERROR_OUT("Request ID is already in the map"); - DPRINTF(RubyStorebuffer, "id: %lld\n", id); + warn("Request ID: %d is already in the map\n", id); ASSERT(0); } else { request_map.insert(make_pair(id, this)); @@ -144,8 +142,7 @@ // make request to libruby and return the id uint64_t id = libruby_issue_request(m_port, request); if (request_map.find(id) != request_map.end()) { - ERROR_OUT("Request ID is already in the map"); - DPRINTF(RubyStorebuffer, "id: %lld\n", id); + warn("Request ID: %d is already in the map\n", id); ASSERT(0); } else { request_map.insert(make_pair(id, this)); @@ -165,7 +162,7 @@ if (!m_use_storebuffer) { // this function should never be called if we are not using a // store buffer - ERROR_OUT("checkForLoadHit called while write buffer is not in use"); + warn("checkForLoadHit called while write buffer is not in use\n"); ASSERT(0); } @@ -217,7 +214,7 @@ StoreBuffer::returnMatchedData(RubyRequest request) { if (!m_use_storebuffer) { - ERROR_OUT("returnMatchedData called while write buffer is not in use"); + warn("returnMatchedData called while write buffer is not in use\n"); ASSERT(0); } @@ -304,7 +301,7 @@ // Note fastpath hits are handled like regular requests - they // must remove the WB entry! if (lineaddr != physical_address) { - ERROR_OUT("error: StoreBuffer: ruby returns pa 0x%0llx " + warn("error: StoreBuffer: ruby returns pa 0x%0llx " "which is not a cache line: 0x%0llx\n", physical_address, lineaddr); } @@ -326,9 +323,10 @@ m_storebuffer_full = false; } else { - ERROR_OUT("[%d] error: StoreBuffer: at complete, address 0x%0llx " - "not found.\n", m_id, lineaddr); - ERROR_OUT("StoreBuffer:: complete FAILS\n"); + warn("[%d] error: StoreBuffer: at complete, address 0x%0llx " + "not found.\n" + "StoreBuffer:: complete FAILS\n", + m_id, lineaddr); ASSERT(0); } diff -r 998b217dcae7 src/mem/ruby/system/CacheMemory.cc --- a/src/mem/ruby/system/CacheMemory.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/system/CacheMemory.cc Sun Dec 19 14:01:59 2010 -0600 @@ -282,7 +282,7 @@ return; } } - ERROR_MSG("Allocate didn't find an available entry"); + panic("Allocate didn't find an available entry"); } void diff -r 998b217dcae7 src/mem/ruby/system/PerfectCacheMemory.hh --- a/src/mem/ruby/system/PerfectCacheMemory.hh Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/system/PerfectCacheMemory.hh Sun Dec 19 14:01:59 2010 -0600 @@ -123,7 +123,7 @@ PerfectCacheMemory::tryCacheAccess(const CacheMsg& msg, bool& block_stc, ENTRY*& entry) { - ERROR_MSG("not implemented"); + panic("not implemented"); } // tests to see if an address is present in the cache @@ -166,7 +166,7 @@ inline Address PerfectCacheMemory::cacheProbe(const Address& newAddress) const { - ERROR_MSG("cacheProbe called in perfect cache"); + panic("cacheProbe called in perfect cache"); } // looks an address up in the cache diff -r 998b217dcae7 src/mem/ruby/system/Sequencer.cc --- a/src/mem/ruby/system/Sequencer.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/system/Sequencer.cc Sun Dec 19 14:01:59 2010 -0600 @@ -27,6 +27,7 @@ */ #include "base/str.hh" +#include "base/misc.hh" #include "cpu/testers/rubytest/RubyTester.hh" #include "mem/protocol/CacheMsg.hh" #include "mem/protocol/Protocol.hh" @@ -99,14 +100,12 @@ if (current_time - request->issue_time < m_deadlock_threshold) continue; - WARN_MSG("Possible Deadlock detected"); - WARN_EXPR(m_version); - WARN_EXPR(request->ruby_request.paddr); - WARN_EXPR(m_readRequestTable.size()); - WARN_EXPR(current_time); - WARN_EXPR(request->issue_time); - WARN_EXPR(current_time - request->issue_time); - ERROR_MSG("Aborting"); + warn("Possible Deadlock detected\n" + "%d %d %u %d %d %d\n", m_version, + request->ruby_request.paddr, m_readRequestTable.size(), + current_time, request->issue_time, + current_time - request->issue_time); + panic("Aborting"); } RequestTable::iterator write = m_writeRequestTable.begin(); @@ -116,14 +115,12 @@ if (current_time - request->issue_time < m_deadlock_threshold) continue; - WARN_MSG("Possible Deadlock detected"); - WARN_EXPR(m_version); - WARN_EXPR(request->ruby_request.paddr); - WARN_EXPR(current_time); - WARN_EXPR(request->issue_time); - WARN_EXPR(current_time - request->issue_time); - WARN_EXPR(m_writeRequestTable.size()); - ERROR_MSG("Aborting"); + warn("Possible Deadlock detected\n" + "%d %d %u %d %d %d\n", m_version, + request->ruby_request.paddr, m_writeRequestTable.size(), + current_time, request->issue_time, + current_time - request->issue_time); + panic("Aborting"); } total_outstanding += m_writeRequestTable.size(); diff -r 998b217dcae7 src/mem/ruby/tester/DeterministicDriver.cc --- a/src/mem/ruby/tester/DeterministicDriver.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/tester/DeterministicDriver.cc Sun Dec 19 14:01:59 2010 -0600 @@ -32,6 +32,7 @@ * */ +#include "base/misc.hh" #include "mem/ruby/common/Global.hh" #include "mem/ruby/tester/Tester_Globals.hh" #include "mem/ruby/tester/DeterministicDriver.hh" @@ -89,7 +90,7 @@ m_generator_vector[i] = new DetermSeriesGETSGenerator(i, *this); break; default: - ERROR_MSG("Unexpected specified generator type"); + fatal("Unexpected specified generator type"); } } diff -r 998b217dcae7 src/mem/ruby/tester/RaceyPseudoThread.cc --- a/src/mem/ruby/tester/RaceyPseudoThread.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/tester/RaceyPseudoThread.cc Sun Dec 19 14:01:59 2010 -0600 @@ -50,10 +50,8 @@ void RaceyPseudoThread::checkForDeadlock() { Time current_time = m_driver.eventQueue->getTime(); if(!m_done && (current_time - m_last_progress) > g_DEADLOCK_THRESHOLD) { - WARN_EXPR(m_proc_id); - WARN_EXPR(m_ic_counter); - WARN_EXPR(m_last_progress); - ERROR_MSG("Deadlock detected."); + warn("%d %d %d\n", m_proc_id, m_ic_counter, m_last_progress); + panic("Deadlock detected."); } } @@ -123,8 +121,8 @@ case 10: goto L10; default: - WARN_EXPR(m_stop); - ERROR_MSG("RaceyPseudoThread: Bad context point!"); + warn("%u\n", m_stop); + fatal("RaceyPseudoThread: Bad context point!"); } // diff -r 998b217dcae7 src/mem/ruby/tester/test_framework.cc --- a/src/mem/ruby/tester/test_framework.cc Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/ruby/tester/test_framework.cc Sun Dec 19 14:01:59 2010 -0600 @@ -34,6 +34,7 @@ using namespace std; +#include "base/misc.hh" #include "mem/ruby/tester/test_framework.hh" #include "mem/protocol/protocol_name.hh" #include "getopt.hh" @@ -211,7 +212,7 @@ int read = replayer->playbackTrace(trace_filename); cout << "(" << read << " requests read)" << endl; if (read == 0) { - ERROR_MSG("Zero items read from tracefile."); + fatal("Zero items read from tracefile."); } } diff -r 998b217dcae7 src/mem/slicc/symbols/StateMachine.py --- a/src/mem/slicc/symbols/StateMachine.py Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/slicc/symbols/StateMachine.py Sun Dec 19 14:01:59 2010 -0600 @@ -829,6 +829,7 @@ // Auto generated C++ code started by $__file__:$__line__ // ${ident}: ${{self.short}} +#include "base/misc.hh" #include "mem/ruby/common/Global.hh" #include "mem/protocol/${ident}_Controller.hh" #include "mem/protocol/${ident}_State.hh" @@ -972,12 +973,9 @@ code(''' default: - WARN_EXPR(m_version); - WARN_EXPR(g_eventQueue_ptr->getTime()); - WARN_EXPR(addr); - WARN_EXPR(event); - WARN_EXPR(state); - ERROR_MSG(\"Invalid transition\"); + warn("version: %d time: %d addr: %s event: %s state: %s\\n", + m_version, g_eventQueue_ptr->getTime(), addr, event, state); + fatal(\"Invalid transition\"); } return TransitionResult_Valid; } diff -r 998b217dcae7 src/mem/slicc/symbols/Type.py --- a/src/mem/slicc/symbols/Type.py Thu Dec 09 14:45:17 2010 -0800 +++ b/src/mem/slicc/symbols/Type.py Sun Dec 19 14:01:59 2010 -0600 @@ -511,6 +511,7 @@ #include #include +#include "base/misc.hh" #include "mem/protocol/${{self.c_ident}}.hh" using namespace std; @@ -548,7 +549,7 @@ # Trailer code(''' default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); + panic("Invalid range for type ${{self.c_ident}}"); return ""; } } @@ -570,8 +571,8 @@ code(''' } else { - WARN_EXPR(str); - ERROR_MSG("Invalid string conversion for type ${{self.c_ident}}"); + warn("%s\\n", str); + panic("Invalid string conversion for type ${{self.c_ident}}"); } } @@ -613,7 +614,7 @@ return ${{len(self.enums)}}; default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); + panic("Invalid range for type ${{self.c_ident}}"); return -1; } } @@ -638,7 +639,7 @@ # Trailer code(''' default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); + panic("Invalid range for type ${{self.c_ident}}"); return MachineType_NUM; } } @@ -666,7 +667,7 @@ code(''' default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); + panic("Invalid range for type ${{self.c_ident}}"); return -1; } @@ -693,7 +694,7 @@ code(''' case ${{self.c_ident}}_NUM: default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); + panic("Invalid range for type ${{self.c_ident}}"); return -1; } }