changeset 81e9d83f87c0 in /z/repo/m5 details: http://repo.m5sim.org/m5?cmd=changeset;node=81e9d83f87c0 description: ruby: Ruby debug print fixes.
diffstat: 2 files changed, 22 insertions(+), 10 deletions(-) src/mem/ruby/common/Debug.cc | 31 +++++++++++++++++++++---------- src/mem/ruby/common/Debug.hh | 1 + diffs (77 lines): diff -r 12da457d6e5c -r 81e9d83f87c0 src/mem/ruby/common/Debug.cc --- a/src/mem/ruby/common/Debug.cc Wed Nov 18 13:55:57 2009 -0800 +++ b/src/mem/ruby/common/Debug.cc Wed Nov 18 13:55:57 2009 -0800 @@ -39,6 +39,7 @@ #include "mem/ruby/common/Debug.hh" #include "mem/ruby/eventqueue/RubyEventQueue.hh" #include "mem/gems_common/util.hh" +#include "base/misc.hh" class Debug; extern Debug* g_debug_ptr; @@ -70,6 +71,7 @@ {"Cache", 'c' }, {"Predictor", 'p' }, {"Allocator", 'a' }, + {"Memory", 'M' }, }; extern "C" void changeDebugVerbosity(VerbosityLevel vb); @@ -95,19 +97,27 @@ Debug::Debug( const string & name, const vector<string> & argv ) { - for (size_t i=0;i<argv.size();i+=2){ - if (argv[i] == "filter_string") - setFilterString( argv[i+1].c_str() ); - else if (argv[i] == "verbosity_string") + // + // must clear the filter before adding filter strings + // + clearFilter(); + + for (size_t i=0;i<argv.size();i+=2) { + if (argv[i] == "filter_string") { + if (setFilterString(argv[i+1].c_str())) { + fatal("could not set filter string to %s\n", argv[i+1].c_str()); + } + } else if (argv[i] == "verbosity_string") { setVerbosityString( argv[i+1].c_str() ); - else if (argv[i] == "start_time") + } else if (argv[i] == "start_time") { m_starting_cycle = atoi( argv[i+1].c_str() ); - else if (argv[i] == "output_filename") + } else if (argv[i] == "output_filename") { setDebugOutputFile( argv[i+1].c_str() ); - else if (argv[i] == "protocol_trace") + } else if (argv[i] == "protocol_trace") { m_protocol_trace = string_to_bool(argv[i+1]); - else - assert(0); + } else { + fatal("invalid argument %s\n"); + } } } @@ -119,7 +129,8 @@ debug_cout_ptr = &cout; m_starting_cycle = filterStartTime; - setFilterString( filterString ); + if (setFilterString(filterString)) + fatal("could not set filter string to %s\n", filterString); setVerbosityString( verboseString ); setDebugOutputFile( filename ); } diff -r 12da457d6e5c -r 81e9d83f87c0 src/mem/ruby/common/Debug.hh --- a/src/mem/ruby/common/Debug.hh Wed Nov 18 13:55:57 2009 -0800 +++ b/src/mem/ruby/common/Debug.hh Wed Nov 18 13:55:57 2009 -0800 @@ -63,6 +63,7 @@ CACHE_COMP, PREDICTOR_COMP, ALLOCATOR_COMP, + MEMORY_COMP, NUMBER_OF_COMPS }; _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev