summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem/ruby/system/System.cc17
-rw-r--r--src/mem/ruby/system/System.hh3
2 files changed, 20 insertions, 0 deletions
diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index 801b2a3e9..a6d0d87d6 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -148,6 +148,23 @@ RubySystem::printStats(ostream& out)
}
void
+RubySystem::serialize(std::ostream &os)
+{
+
+}
+
+void
+RubySystem::unserialize(Checkpoint *cp, const string &section)
+{
+ //
+ // The main purpose for clearing stats in the unserialize process is so
+ // that the profiler can correctly set its start time to the unserialized
+ // value of curTick
+ //
+ clearStats();
+}
+
+void
RubySystem::clearStats() const
{
m_profiler_ptr->clearStats();
diff --git a/src/mem/ruby/system/System.hh b/src/mem/ruby/system/System.hh
index 77b056faf..608aca1d8 100644
--- a/src/mem/ruby/system/System.hh
+++ b/src/mem/ruby/system/System.hh
@@ -125,6 +125,9 @@ class RubySystem : public SimObject
void print(std::ostream& out) const;
+ virtual void serialize(std::ostream &os);
+ virtual void unserialize(Checkpoint *cp, const std::string &section);
+
private:
// Private copy constructor and assignment operator
RubySystem(const RubySystem& obj);