diff options
author | Polina Dudnik <pdudnik@gmail.com> | 2009-07-13 12:50:10 -0500 |
---|---|---|
committer | Polina Dudnik <pdudnik@gmail.com> | 2009-07-13 12:50:10 -0500 |
commit | 9a675a0391aa0c0463baf8bac0b9209b675306a8 (patch) | |
tree | 8b2f2edf3e916fa0b2958a52cc55d6743796dec4 /src/mem/ruby/libruby.cc | |
parent | b28058917c7bd324ca2b080a0a5f7ba617ea4c40 (diff) | |
download | gem5-9a675a0391aa0c0463baf8bac0b9209b675306a8.tar.xz |
Changes to add tracing and replaying command-line options
Trace is automatically ended upon a manual checkpoint
Diffstat (limited to 'src/mem/ruby/libruby.cc')
-rw-r--r-- | src/mem/ruby/libruby.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mem/ruby/libruby.cc b/src/mem/ruby/libruby.cc index d35600960..185797f59 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) { @@ -204,6 +205,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); |