From 9a675a0391aa0c0463baf8bac0b9209b675306a8 Mon Sep 17 00:00:00 2001 From: Polina Dudnik Date: Mon, 13 Jul 2009 12:50:10 -0500 Subject: Changes to add tracing and replaying command-line options Trace is automatically ended upon a manual checkpoint --- src/mem/ruby/libruby.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mem/ruby/libruby.cc') 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); -- cgit v1.2.3