From 658849d101c98b6d8c7a06f41ffbe39675848eac Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Wed, 1 Dec 2010 11:30:04 -0800 Subject: ruby: Converted old ruby debug calls to M5 debug calls This patch developed by Nilay Vaish converts all the old GEMS-style ruby debug calls to the appropriate M5 debug calls. --- src/mem/ruby/common/Debug.cc | 7 ------ src/mem/ruby/common/Debug.hh | 57 ------------------------------------------ src/mem/ruby/common/NetDest.hh | 2 +- 3 files changed, 1 insertion(+), 65 deletions(-) (limited to 'src/mem/ruby/common') diff --git a/src/mem/ruby/common/Debug.cc b/src/mem/ruby/common/Debug.cc index eb6cc5c47..6995ef637 100644 --- a/src/mem/ruby/common/Debug.cc +++ b/src/mem/ruby/common/Debug.cc @@ -208,13 +208,6 @@ Debug::checkFilterString(const char *filter_str) return false; // no error } - if (RUBY_DEBUG == false) { - cerr << "Error: User specified set of debug components, but the " - << "RUBY_DEBUG compile-time flag is false." << endl - << "Solution: Re-compile with RUBY_DEBUG set to true." << endl; - return true; // error - } - if (string(filter_str) == "all") { return false; // no error } diff --git a/src/mem/ruby/common/Debug.hh b/src/mem/ruby/common/Debug.hh index f8c18a0b5..7005d95f7 100644 --- a/src/mem/ruby/common/Debug.hh +++ b/src/mem/ruby/common/Debug.hh @@ -36,7 +36,6 @@ #include #include -#include "config/ruby_debug.hh" #include "mem/ruby/common/Global.hh" #include "sim/sim_object.hh" @@ -228,62 +227,6 @@ const bool ASSERT_FLAG = true; } \ } while (0) -#define DEBUG_MSG(module, priority, MESSAGE) do { \ - using namespace std; \ - if (RUBY_DEBUG) { \ - if (g_debug_ptr->validDebug(module, priority)) { \ - (* debug_cout_ptr) << "Debug: in fn " \ - << __PRETTY_FUNCTION__ \ - << " in " << __FILE__ << ":" \ - << __LINE__ << ": " \ - << (MESSAGE) << endl << flush; \ - } \ - } \ -} while (0) - -#define DEBUG_EXPR(module, priority, EXPR) do { \ - using namespace std; \ - if (RUBY_DEBUG) { \ - if (g_debug_ptr->validDebug(module, priority)) { \ - (* debug_cout_ptr) << "Debug: in fn " \ - << __PRETTY_FUNCTION__ \ - << " in " << __FILE__ << ":" \ - << __LINE__ << ": " \ - << #EXPR << " is " \ - << (EXPR) << endl << flush; \ - } \ - } \ -} while (0) - -#define DEBUG_NEWLINE(module, priority) do { \ - using namespace std; \ - if (RUBY_DEBUG) { \ - if (g_debug_ptr->validDebug(module, priority)) { \ - (* debug_cout_ptr) << endl << flush; \ - } \ - } \ -} while (0) - -#define DEBUG_SLICC(priority, LINE, MESSAGE) do { \ - using namespace std; \ - if (RUBY_DEBUG) { \ - if (g_debug_ptr->validDebug(SLICC_COMP, priority)) { \ - (* debug_cout_ptr) << (LINE) << (MESSAGE) << endl << flush; \ - } \ - } \ -} while (0) - -#define DEBUG_OUT(rest... ) do { \ - using namespace std; \ - if (RUBY_DEBUG) { \ - cout << "Debug: in fn " \ - << __PRETTY_FUNCTION__ \ - << " in " << __FILE__ << ":" \ - << __LINE__ << ": "; \ - g_debug_ptr->debugMsg(rest); \ - } \ -} while (0) - #define ERROR_OUT( rest... ) do { \ using namespace std; \ if (ERROR_MESSAGE_FLAG) { \ diff --git a/src/mem/ruby/common/NetDest.hh b/src/mem/ruby/common/NetDest.hh index 3fe87f69b..dc4a54965 100644 --- a/src/mem/ruby/common/NetDest.hh +++ b/src/mem/ruby/common/NetDest.hh @@ -55,7 +55,7 @@ class NetDest ~NetDest() { - DEBUG_MSG(MEMORY_COMP, LowPrio, "NetDest Destructor"); + DPRINTF(RubyMemory, "NetDest Destructor\n"); } void add(MachineID newElement); -- cgit v1.2.3