diff options
Diffstat (limited to 'src/mem/ruby/libruby.cc')
-rw-r--r-- | src/mem/ruby/libruby.cc | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/src/mem/ruby/libruby.cc b/src/mem/ruby/libruby.cc index 987f4fd10..b867fec34 100644 --- a/src/mem/ruby/libruby.cc +++ b/src/mem/ruby/libruby.cc @@ -9,6 +9,7 @@ #include "mem/ruby/eventqueue/RubyEventQueue.hh" #include "mem/ruby/system/MemoryVector.hh" #include "mem/ruby/common/Address.hh" +#include "mem/ruby/recorder/Tracer.hh" string RubyRequestType_to_string(const RubyRequestType& obj) { @@ -19,8 +20,14 @@ string RubyRequestType_to_string(const RubyRequestType& obj) return "LD"; case RubyRequestType_ST: return "ST"; - case RubyRequestType_RMW: - return "RMW"; + case RubyRequestType_Locked_Read: + return "Locked_Read"; + case RubyRequestType_Locked_Write: + return "Locked_Write"; + case RubyRequestType_RMW_Read: + return "RMW_Read"; + case RubyRequestType_RMW_Write: + return "RMW_Write"; case RubyRequestType_NULL: default: assert(0); @@ -36,8 +43,14 @@ RubyRequestType string_to_RubyRequestType(std::string str) return RubyRequestType_LD; else if (str == "ST") return RubyRequestType_ST; - else if (str == "RMW") - return RubyRequestType_RMW; + else if (str == "Locked_Read") + return RubyRequestType_Locked_Read; + else if (str == "Locked_Write") + return RubyRequestType_Locked_Write; + else if (str == "RMW_Read") + return RubyRequestType_RMW_Read; + else if (str == "RMW_Write") + return RubyRequestType_RMW_Write; else assert(0); return RubyRequestType_NULL; @@ -200,6 +213,20 @@ void libruby_print_stats(std::ostream & out) { RubySystem::printStats(out); } +void libruby_playback_trace(char * trace_filename) +{ + RubySystem::getTracer()->playbackTrace(trace_filename); +} + +void libruby_start_tracing(char * record_filename) { + // start the trace + RubySystem::getTracer()->startTrace(record_filename); +} + +void libruby_stop_tracing() { + // start the trace + RubySystem::getTracer()->stopTrace(); +} uint64_t libruby_get_time() { return RubySystem::getCycleCount(0); |